]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/komeda: remove img_enhancement property
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 5 Jul 2019 12:10:04 +0000 (14:10 +0200)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Mon, 8 Jul 2019 13:44:35 +0000 (14:44 +0100)
Properties are uapi like anything else, with all the usual rules
regarding review, testcases, open source userspace ... Furthermore
driver-private kms properties are highly discouraged, over the past
few years we've realized we need to make a serious effort at better
standardizing this stuff.

Again this probably needs multiple pieces to solve this properly:

- Instead of expecting userspace to compute this (and duplicating
  modeset code), the kernel driver should compute when it's possible
  to enable this better up/downscale mode (assuming I understood
  Liviu correctly on what this does) automatically.

- If this is needed for validation then you want a debugfs file to
  force this one way or the other, or alternatively  use
  ->atomic_print_state to dump such hidden driver-private state.
  Depends upon how you do your validation ofc.

Fixes: 83ef0dd718e1 ("drm/komeda: Add image enhancement support")
Cc: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Cc: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mali DP Maintainers <malidp@foss.arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190705121006.26085-3-daniel.vetter@ffwll.ch
drivers/gpu/drm/arm/display/komeda/komeda_kms.h
drivers/gpu/drm/arm/display/komeda/komeda_plane.c

index c545cb963d400998b39ee36bc0bcc4b65df339d9..fb2adc233760c88fdc055f332ea0dfeccee677f6 100644 (file)
@@ -34,8 +34,6 @@ struct komeda_plane {
         */
        struct komeda_layer *layer;
 
-       /** @prop_img_enhancement: for on/off image enhancement */
-       struct drm_property *prop_img_enhancement;
        /** @prop_layer_split: for on/off layer_split */
        struct drm_property *prop_layer_split;
 };
index 04b122f28fb65066ee883840f41ecf92d2a59e71..23db38650a465bd3f24ad47c39bf0a414e10ceab 100644 (file)
@@ -197,9 +197,7 @@ komeda_plane_atomic_get_property(struct drm_plane *plane,
        struct komeda_plane *kplane = to_kplane(plane);
        struct komeda_plane_state *st = to_kplane_st(state);
 
-       if (property == kplane->prop_img_enhancement)
-               *val = st->img_enhancement;
-       else if (property == kplane->prop_layer_split)
+       if (property == kplane->prop_layer_split)
                *val = st->layer_split;
        else
                return -EINVAL;
@@ -216,9 +214,7 @@ komeda_plane_atomic_set_property(struct drm_plane *plane,
        struct komeda_plane *kplane = to_kplane(plane);
        struct komeda_plane_state *st = to_kplane_st(state);
 
-       if (property == kplane->prop_img_enhancement)
-               st->img_enhancement = !!val;
-       else if (property == kplane->prop_layer_split)
+       if (property == kplane->prop_layer_split)
                st->layer_split = !!val;
        else
                return -EINVAL;
@@ -258,17 +254,6 @@ komeda_plane_create_layer_properties(struct komeda_plane *kplane,
        struct drm_plane *plane = &kplane->base;
        struct drm_property *prop = NULL;
 
-       /* property: layer image_enhancement */
-       if (layer->base.supported_outputs & KOMEDA_PIPELINE_SCALERS) {
-               prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
-                                               "img_enhancement");
-               if (!prop)
-                       return -ENOMEM;
-
-               drm_object_attach_property(&plane->base, prop, 0);
-               kplane->prop_img_enhancement = prop;
-       }
-
        /* property: layer split */
        if (layer->right) {
                prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,