drm/kms: Nuke dirty_info property
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 12 Aug 2016 20:48:45 +0000 (22:48 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 16 Aug 2016 14:30:50 +0000 (16:30 +0200)
It was added way back together with the dirty_fb ioctl, but neither
generic xfree86-modesetting nor the vmware driver use it. Everyone is
supposed to just unconditionally call the dirtyfb when they do
frontbuffer rendering.

And since unused uabi is bad uabi (there's reasons we require open
source userspace for everything) let's nuke this.

For reference see

commit 884840aa3ce3214259e69557be5b4ce0d781ffa4
Author: Jakob Bornecrantz <jakob@vmware.com>
Date:   Thu Dec 3 23:25:47 2009 +0000

    drm: Add dirty ioctl and property

Cc: Jakob Bornecrantz <jakob@vmware.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-9-git-send-email-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/udl/udl_connector.c
drivers/gpu/drm/udl/udl_modeset.c
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
include/drm/drm_crtc.h

index fd9dcecb3eb5f11c9a58af032f7315c1583da9fb..eb7aba874652694fa174bb399c7cc5b35c472e59 100644 (file)
@@ -136,12 +136,6 @@ static const struct drm_prop_enum_list drm_tv_subconnector_enum_list[] = {
 DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name,
                 drm_tv_subconnector_enum_list)
 
-static const struct drm_prop_enum_list drm_dirty_info_enum_list[] = {
-       { DRM_MODE_DIRTY_OFF,      "Off"      },
-       { DRM_MODE_DIRTY_ON,       "On"       },
-       { DRM_MODE_DIRTY_ANNOTATE, "Annotate" },
-};
-
 struct drm_conn_prop_enum_list {
        int type;
        const char *name;
@@ -1887,31 +1881,6 @@ int drm_mode_create_aspect_ratio_property(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property);
 
-/**
- * drm_mode_create_dirty_property - create dirty property
- * @dev: DRM device
- *
- * Called by a driver the first time it's needed, must be attached to desired
- * connectors.
- */
-int drm_mode_create_dirty_info_property(struct drm_device *dev)
-{
-       struct drm_property *dirty_info;
-
-       if (dev->mode_config.dirty_info_property)
-               return 0;
-
-       dirty_info =
-               drm_property_create_enum(dev, DRM_MODE_PROP_IMMUTABLE,
-                                   "dirty",
-                                   drm_dirty_info_enum_list,
-                                   ARRAY_SIZE(drm_dirty_info_enum_list));
-       dev->mode_config.dirty_info_property = dirty_info;
-
-       return 0;
-}
-EXPORT_SYMBOL(drm_mode_create_dirty_info_property);
-
 /**
  * drm_mode_create_suggested_offset_properties - create suggests offset properties
  * @dev: DRM device
index 4709b54c204c21f71c6efbd8ad3d1070f126e489..d2f57c52f7db2c74dcba7bcc35a6a3c622009cbe 100644 (file)
@@ -150,8 +150,5 @@ int udl_connector_init(struct drm_device *dev, struct drm_encoder *encoder)
        drm_connector_register(connector);
        drm_mode_connector_attach_encoder(connector, encoder);
 
-       drm_object_attach_property(&connector->base,
-                                     dev->mode_config.dirty_info_property,
-                                     1);
        return 0;
 }
index f92ea957967471f80f14a83da4c0d71ad3cd4aae..73695127c573fd98eb57da13f7ccd4263bde230c 100644 (file)
@@ -441,8 +441,6 @@ int udl_modeset_init(struct drm_device *dev)
 
        dev->mode_config.funcs = &udl_mode_funcs;
 
-       drm_mode_create_dirty_info_property(dev);
-
        udl_crtc_init(dev);
 
        encoder = udl_encoder_init(dev);
index 63ccd9871ec94266a25ee435b05ef3dd7b20e1b0..23ec673d5e16290108c7ec30a8dbdbe62f8c87a1 100644 (file)
@@ -376,9 +376,6 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
 
        drm_mode_crtc_set_gamma_size(crtc, 256);
 
-       drm_object_attach_property(&connector->base,
-                                  dev->mode_config.dirty_info_property,
-                                  1);
        drm_object_attach_property(&connector->base,
                                   dev_priv->hotplug_mode_update_property, 1);
        drm_object_attach_property(&connector->base,
@@ -421,10 +418,6 @@ int vmw_kms_ldu_init_display(struct vmw_private *dev_priv)
        if (ret != 0)
                goto err_free;
 
-       ret = drm_mode_create_dirty_info_property(dev);
-       if (ret != 0)
-               goto err_vblank_cleanup;
-
        vmw_kms_create_implicit_placement_property(dev_priv, true);
 
        if (dev_priv->capabilities & SVGA_CAP_MULTIMON)
@@ -439,8 +432,6 @@ int vmw_kms_ldu_init_display(struct vmw_private *dev_priv)
 
        return 0;
 
-err_vblank_cleanup:
-       drm_vblank_cleanup(dev);
 err_free:
        kfree(dev_priv->ldu_priv);
        dev_priv->ldu_priv = NULL;
index b74eae2b8594d54a6083311fae8dd9fd8854e2d9..f42359084adc4e9890427c7d8a1ac5fcfce6507f 100644 (file)
@@ -537,9 +537,6 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit)
 
        drm_mode_crtc_set_gamma_size(crtc, 256);
 
-       drm_object_attach_property(&connector->base,
-                                  dev->mode_config.dirty_info_property,
-                                  1);
        drm_object_attach_property(&connector->base,
                                   dev_priv->hotplug_mode_update_property, 1);
        drm_object_attach_property(&connector->base,
@@ -574,10 +571,6 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv)
        if (unlikely(ret != 0))
                return ret;
 
-       ret = drm_mode_create_dirty_info_property(dev);
-       if (unlikely(ret != 0))
-               goto err_vblank_cleanup;
-
        vmw_kms_create_implicit_placement_property(dev_priv, false);
 
        for (i = 0; i < VMWGFX_NUM_DISPLAY_UNITS; ++i)
@@ -588,10 +581,6 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv)
        DRM_INFO("Screen Objects Display Unit initialized\n");
 
        return 0;
-
-err_vblank_cleanup:
-       drm_vblank_cleanup(dev);
-       return ret;
 }
 
 int vmw_kms_sou_close_display(struct vmw_private *dev_priv)
index 41932a7c4f79516da86f9e35d1223c8e033cf248..94ad8d2acf9a2106cafdc9349c4f1518d5d85503 100644 (file)
@@ -1130,9 +1130,6 @@ static int vmw_stdu_init(struct vmw_private *dev_priv, unsigned unit)
 
        drm_mode_crtc_set_gamma_size(crtc, 256);
 
-       drm_object_attach_property(&connector->base,
-                                  dev->mode_config.dirty_info_property,
-                                  1);
        drm_object_attach_property(&connector->base,
                                   dev_priv->hotplug_mode_update_property, 1);
        drm_object_attach_property(&connector->base,
@@ -1202,10 +1199,6 @@ int vmw_kms_stdu_init_display(struct vmw_private *dev_priv)
        if (unlikely(ret != 0))
                return ret;
 
-       ret = drm_mode_create_dirty_info_property(dev);
-       if (unlikely(ret != 0))
-               goto err_vblank_cleanup;
-
        dev_priv->active_display_unit = vmw_du_screen_target;
 
        vmw_kms_create_implicit_placement_property(dev_priv, false);
index 410175be4c6ade11dc80e529a636f28d9401df08..5a7809f029ba579c32977047dfb4f06855bae065 100644 (file)
@@ -2639,12 +2639,6 @@ struct drm_mode_config {
         * HDMI infoframe aspect ratio setting.
         */
        struct drm_property *aspect_ratio_property;
-       /**
-        * @dirty_info_property: Optional connector property to give userspace a
-        * hint that the DIRTY_FB ioctl should be used.
-        */
-       struct drm_property *dirty_info_property;
-
        /**
         * @degamma_lut_property: Optional CRTC property to set the LUT used to
         * convert the framebuffer's colors to linear gamma.
@@ -2943,7 +2937,6 @@ extern int drm_mode_create_tv_properties(struct drm_device *dev,
                                         const char * const modes[]);
 extern int drm_mode_create_scaling_mode_property(struct drm_device *dev);
 extern int drm_mode_create_aspect_ratio_property(struct drm_device *dev);
-extern int drm_mode_create_dirty_info_property(struct drm_device *dev);
 extern int drm_mode_create_suggested_offset_properties(struct drm_device *dev);
 
 extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,