diff mbox

[2/2] drm: Get atomic property value even if DRIVER_ATOMIC is not set

Message ID 1482282183-4452-2-git-send-email-dhinakaran.pandiyan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dhinakaran Pandiyan Dec. 21, 2016, 1:03 a.m. UTC
i915 does not set DRIVER_ATOMIC by default yet but uses atomic_check and
atomic_commit. drm_object_property_get_value() does not read the correct
value of atomic properties if DRIVER_ATOMIC is not set. Checking whether
the driver uses atomic modeset is a better check instead as the property
values are tracked in the state structures.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/drm_mode_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter Dec. 21, 2016, 8:53 a.m. UTC | #1
On Tue, Dec 20, 2016 at 05:03:03PM -0800, Dhinakaran Pandiyan wrote:
> i915 does not set DRIVER_ATOMIC by default yet but uses atomic_check and
> atomic_commit. drm_object_property_get_value() does not read the correct
> value of atomic properties if DRIVER_ATOMIC is not set. Checking whether
> the driver uses atomic modeset is a better check instead as the property
> values are tracked in the state structures.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

I've reviewed all other users for DRIVER_ATOMIC checks, and I think this
is the only one left that we should change. Will merge as soon as you've
respun patch 1.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-Daniel
> ---
>  drivers/gpu/drm/drm_mode_object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> index 9f17085..292d339 100644
> --- a/drivers/gpu/drm/drm_mode_object.c
> +++ b/drivers/gpu/drm/drm_mode_object.c
> @@ -273,7 +273,7 @@ int drm_object_property_get_value(struct drm_mode_object *obj,
>  	 * their value in obj->properties->values[].. mostly to avoid
>  	 * having to deal w/ EDID and similar props in atomic paths:
>  	 */
> -	if (drm_core_check_feature(property->dev, DRIVER_ATOMIC) &&
> +	if (drm_drv_uses_atomic_modeset(property->dev) &&
>  			!(property->flags & DRM_MODE_PROP_IMMUTABLE))
>  		return drm_atomic_get_property(obj, property, val);
>  
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
index 9f17085..292d339 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -273,7 +273,7 @@  int drm_object_property_get_value(struct drm_mode_object *obj,
 	 * their value in obj->properties->values[].. mostly to avoid
 	 * having to deal w/ EDID and similar props in atomic paths:
 	 */
-	if (drm_core_check_feature(property->dev, DRIVER_ATOMIC) &&
+	if (drm_drv_uses_atomic_modeset(property->dev) &&
 			!(property->flags & DRM_MODE_PROP_IMMUTABLE))
 		return drm_atomic_get_property(obj, property, val);