[PATCH v2 2/2] drm: Get atomic property value even if DRIVER_ATOMIC is not set
Alex Deucher
alexdeucher at gmail.com
Tue Jan 3 16:06:43 UTC 2017
On Wed, Dec 21, 2016 at 3:12 PM, Dhinakaran Pandiyan
<dhinakaran.pandiyan at intel.com> 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.
>
I think we are in the same boat. Adding Andrey and Harry.
Alex
> v2: Included header
>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> ---
> drivers/gpu/drm/drm_mode_object.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> index 9f17085..14543ff 100644
> --- a/drivers/gpu/drm/drm_mode_object.c
> +++ b/drivers/gpu/drm/drm_mode_object.c
> @@ -23,6 +23,7 @@
> #include <linux/export.h>
> #include <drm/drmP.h>
> #include <drm/drm_mode_object.h>
> +#include <drm/drm_atomic.h>
>
> #include "drm_crtc_internal.h"
>
> @@ -273,7 +274,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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the dri-devel
mailing list