diff options
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_atomic.c | 38 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp_mst.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dsi.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 1 |
11 files changed, 51 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index 5c31f54a3711..52ef6f4abe45 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c | |||
@@ -162,3 +162,41 @@ int intel_atomic_commit(struct drm_device *dev, | |||
162 | 162 | ||
163 | return 0; | 163 | return 0; |
164 | } | 164 | } |
165 | |||
166 | /** | ||
167 | * intel_connector_atomic_get_property - fetch connector property value | ||
168 | * @connector: connector to fetch property for | ||
169 | * @state: state containing the property value | ||
170 | * @property: property to look up | ||
171 | * @val: pointer to write property value into | ||
172 | * | ||
173 | * The DRM core does not store shadow copies of properties for | ||
174 | * atomic-capable drivers. This entrypoint is used to fetch | ||
175 | * the current value of a driver-specific connector property. | ||
176 | */ | ||
177 | int | ||
178 | intel_connector_atomic_get_property(struct drm_connector *connector, | ||
179 | const struct drm_connector_state *state, | ||
180 | struct drm_property *property, | ||
181 | uint64_t *val) | ||
182 | { | ||
183 | int i; | ||
184 | |||
185 | /* | ||
186 | * TODO: We only have atomic modeset for planes at the moment, so the | ||
187 | * crtc/connector code isn't quite ready yet. Until it's ready, | ||
188 | * continue to look up all property values in the DRM's shadow copy | ||
189 | * in obj->properties->values[]. | ||
190 | * | ||
191 | * When the crtc/connector state work matures, this function should | ||
192 | * be updated to read the values out of the state structure instead. | ||
193 | */ | ||
194 | for (i = 0; i < connector->base.properties->count; i++) { | ||
195 | if (connector->base.properties->properties[i] == property) { | ||
196 | *val = connector->base.properties->values[i]; | ||
197 | return 0; | ||
198 | } | ||
199 | } | ||
200 | |||
201 | return -EINVAL; | ||
202 | } | ||
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 18ee41ef0f18..e66e17af0a56 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -794,6 +794,7 @@ static const struct drm_connector_funcs intel_crt_connector_funcs = { | |||
794 | .destroy = intel_crt_destroy, | 794 | .destroy = intel_crt_destroy, |
795 | .set_property = intel_crt_set_property, | 795 | .set_property = intel_crt_set_property, |
796 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 796 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
797 | .atomic_get_property = intel_connector_atomic_get_property, | ||
797 | }; | 798 | }; |
798 | 799 | ||
799 | static const struct drm_connector_helper_funcs intel_crt_connector_helper_funcs = { | 800 | static const struct drm_connector_helper_funcs intel_crt_connector_helper_funcs = { |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 8bdaaaff35f3..eea9e366a109 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -4402,6 +4402,7 @@ static const struct drm_connector_funcs intel_dp_connector_funcs = { | |||
4402 | .force = intel_dp_force, | 4402 | .force = intel_dp_force, |
4403 | .fill_modes = drm_helper_probe_single_connector_modes, | 4403 | .fill_modes = drm_helper_probe_single_connector_modes, |
4404 | .set_property = intel_dp_set_property, | 4404 | .set_property = intel_dp_set_property, |
4405 | .atomic_get_property = intel_connector_atomic_get_property, | ||
4405 | .destroy = intel_dp_connector_destroy, | 4406 | .destroy = intel_dp_connector_destroy, |
4406 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 4407 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
4407 | }; | 4408 | }; |
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index f86da0fad718..2856b0bffd07 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c | |||
@@ -314,6 +314,7 @@ static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { | |||
314 | .detect = intel_dp_mst_detect, | 314 | .detect = intel_dp_mst_detect, |
315 | .fill_modes = drm_helper_probe_single_connector_modes, | 315 | .fill_modes = drm_helper_probe_single_connector_modes, |
316 | .set_property = intel_dp_mst_set_property, | 316 | .set_property = intel_dp_mst_set_property, |
317 | .atomic_get_property = intel_connector_atomic_get_property, | ||
317 | .destroy = intel_dp_mst_connector_destroy, | 318 | .destroy = intel_dp_mst_connector_destroy, |
318 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 319 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
319 | }; | 320 | }; |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 18f167b49575..28b846e2e15a 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -1254,6 +1254,10 @@ int intel_atomic_check(struct drm_device *dev, | |||
1254 | int intel_atomic_commit(struct drm_device *dev, | 1254 | int intel_atomic_commit(struct drm_device *dev, |
1255 | struct drm_atomic_state *state, | 1255 | struct drm_atomic_state *state, |
1256 | bool async); | 1256 | bool async); |
1257 | int intel_connector_atomic_get_property(struct drm_connector *connector, | ||
1258 | const struct drm_connector_state *state, | ||
1259 | struct drm_property *property, | ||
1260 | uint64_t *val); | ||
1257 | 1261 | ||
1258 | /* intel_atomic_plane.c */ | 1262 | /* intel_atomic_plane.c */ |
1259 | struct intel_plane_state *intel_create_plane_state(struct drm_plane *plane); | 1263 | struct intel_plane_state *intel_create_plane_state(struct drm_plane *plane); |
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index e20bb1f8879c..317e63396060 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c | |||
@@ -786,6 +786,7 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = { | |||
786 | .detect = intel_dsi_detect, | 786 | .detect = intel_dsi_detect, |
787 | .destroy = intel_dsi_destroy, | 787 | .destroy = intel_dsi_destroy, |
788 | .fill_modes = drm_helper_probe_single_connector_modes, | 788 | .fill_modes = drm_helper_probe_single_connector_modes, |
789 | .atomic_get_property = intel_connector_atomic_get_property, | ||
789 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 790 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
790 | }; | 791 | }; |
791 | 792 | ||
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index 1cf2e352ad1b..d8579510beb0 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -391,6 +391,7 @@ static const struct drm_connector_funcs intel_dvo_connector_funcs = { | |||
391 | .detect = intel_dvo_detect, | 391 | .detect = intel_dvo_detect, |
392 | .destroy = intel_dvo_destroy, | 392 | .destroy = intel_dvo_destroy, |
393 | .fill_modes = drm_helper_probe_single_connector_modes, | 393 | .fill_modes = drm_helper_probe_single_connector_modes, |
394 | .atomic_get_property = intel_connector_atomic_get_property, | ||
394 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 395 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
395 | }; | 396 | }; |
396 | 397 | ||
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index b8fab8cb42bf..995c5b261f4f 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -1615,6 +1615,7 @@ static const struct drm_connector_funcs intel_hdmi_connector_funcs = { | |||
1615 | .force = intel_hdmi_force, | 1615 | .force = intel_hdmi_force, |
1616 | .fill_modes = drm_helper_probe_single_connector_modes, | 1616 | .fill_modes = drm_helper_probe_single_connector_modes, |
1617 | .set_property = intel_hdmi_set_property, | 1617 | .set_property = intel_hdmi_set_property, |
1618 | .atomic_get_property = intel_connector_atomic_get_property, | ||
1618 | .destroy = intel_hdmi_destroy, | 1619 | .destroy = intel_hdmi_destroy, |
1619 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 1620 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
1620 | }; | 1621 | }; |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 908bd42fac5d..071b96d6e146 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -532,6 +532,7 @@ static const struct drm_connector_funcs intel_lvds_connector_funcs = { | |||
532 | .detect = intel_lvds_detect, | 532 | .detect = intel_lvds_detect, |
533 | .fill_modes = drm_helper_probe_single_connector_modes, | 533 | .fill_modes = drm_helper_probe_single_connector_modes, |
534 | .set_property = intel_lvds_set_property, | 534 | .set_property = intel_lvds_set_property, |
535 | .atomic_get_property = intel_connector_atomic_get_property, | ||
535 | .destroy = intel_lvds_destroy, | 536 | .destroy = intel_lvds_destroy, |
536 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 537 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
537 | }; | 538 | }; |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index ae00bf9ce07a..64ad2b40179f 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -2191,6 +2191,7 @@ static const struct drm_connector_funcs intel_sdvo_connector_funcs = { | |||
2191 | .detect = intel_sdvo_detect, | 2191 | .detect = intel_sdvo_detect, |
2192 | .fill_modes = drm_helper_probe_single_connector_modes, | 2192 | .fill_modes = drm_helper_probe_single_connector_modes, |
2193 | .set_property = intel_sdvo_set_property, | 2193 | .set_property = intel_sdvo_set_property, |
2194 | .atomic_get_property = intel_connector_atomic_get_property, | ||
2194 | .destroy = intel_sdvo_destroy, | 2195 | .destroy = intel_sdvo_destroy, |
2195 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 2196 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
2196 | }; | 2197 | }; |
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index d450054584a9..892d23c8479d 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1513,6 +1513,7 @@ static const struct drm_connector_funcs intel_tv_connector_funcs = { | |||
1513 | .detect = intel_tv_detect, | 1513 | .detect = intel_tv_detect, |
1514 | .destroy = intel_tv_destroy, | 1514 | .destroy = intel_tv_destroy, |
1515 | .set_property = intel_tv_set_property, | 1515 | .set_property = intel_tv_set_property, |
1516 | .atomic_get_property = intel_connector_atomic_get_property, | ||
1516 | .fill_modes = drm_helper_probe_single_connector_modes, | 1517 | .fill_modes = drm_helper_probe_single_connector_modes, |
1517 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, | 1518 | .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, |
1518 | }; | 1519 | }; |