summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic_helper.c
diff options
context:
space:
mode:
authorDaniel Vetter2017-04-03 10:33:01 +0200
committerDaniel Vetter2017-04-06 10:21:55 +0200
commit6d124ff845334bc466f56c059147e7ad587c2e7e (patch)
tree7b1e65482312d947f8f461924183855a5e304bfc /drivers/gpu/drm/drm_atomic_helper.c
parentdrm: Add explicit acquire ctx handling around ->gamma_set (diff)
downloadkernel-qcow2-linux-6d124ff845334bc466f56c059147e7ad587c2e7e.tar.gz
kernel-qcow2-linux-6d124ff845334bc466f56c059147e7ad587c2e7e.tar.xz
kernel-qcow2-linux-6d124ff845334bc466f56c059147e7ad587c2e7e.zip
drm: Add acquire ctx to ->gamma_set hook
Atomic helpers really want this instead of the hacked-up legacy backoff trick, which unfortunately prevents drivers from using their own private drm_modeset_locks. Aside: There's a few atomic drivers (nv50, vc4, soon vmwgfx) which don't yet use the new atomic color mgmt/gamma table stuff. Would be nice if they could switch over and just hook up drm_atomic_helper_legacy_gamma_set() instead. Cc: Dave Airlie <airlied@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Sinclair Yeh <syeh@vmware.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-13-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 0a3d91c51d61..25569e5b3adc 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3479,6 +3479,7 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state);
* @green: green correction table
* @blue: green correction table
* @size: size of the tables
+ * @ctx: lock acquire context
*
* Implements support for legacy gamma correction table for drivers
* that support color management through the DEGAMMA_LUT/GAMMA_LUT
@@ -3486,7 +3487,8 @@ EXPORT_SYMBOL(drm_atomic_helper_connector_destroy_state);
*/
int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
u16 *red, u16 *green, u16 *blue,
- uint32_t size)
+ uint32_t size,
+ struct drm_modeset_acquire_ctx *ctx)
{
struct drm_device *dev = crtc->dev;
struct drm_mode_config *config = &dev->mode_config;