Re: [PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Tomi Valkeinen
On 10/12/2020 18:32, Ville Syrjälä wrote: >>> @@ -1053,18 +1052,9 @@ static int setcmap_atomic(struct fb_cmap *cmap, >>> struct fb_info *info) >>> goto out_state; >>> } >>> >>> - crtc_state = drm_atomic_get_crtc_state(state, crtc); >>> - if

Re: [PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Tomi Valkeinen
On 10/12/2020 17:27, Daniel Vetter wrote: >> diff --git a/drivers/gpu/drm/drm_fb_helper.c >> b/drivers/gpu/drm/drm_fb_helper.c >> index e82db0f4e771..80e3797f0f01 100644 >> --- a/drivers/gpu/drm/drm_fb_helper.c >> +++ b/drivers/gpu/drm/drm_fb_helper.c >> @@ -46,6 +46,7 @@ >> #include >>

[PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Tomi Valkeinen
To support legacy gamma ioctls the drivers need to set drm_crtc_funcs.gamma_set either to a custom implementation or to drm_atomic_helper_legacy_gamma_set. Most of the atomic drivers do the latter. We can simplify this by making the core handle it automatically. Add three functions to

Re: [PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Daniel Vetter
On Thu, Dec 10, 2020 at 4:43 PM Tomi Valkeinen wrote: > > On 10/12/2020 17:27, Daniel Vetter wrote: > > >> diff --git a/drivers/gpu/drm/drm_fb_helper.c > >> b/drivers/gpu/drm/drm_fb_helper.c > >> index e82db0f4e771..80e3797f0f01 100644 > >> --- a/drivers/gpu/drm/drm_fb_helper.c > >> +++

Re: [PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Ville Syrjälä
On Thu, Dec 10, 2020 at 04:27:39PM +0100, Daniel Vetter wrote: > On Thu, Dec 10, 2020 at 04:08:51PM +0200, Tomi Valkeinen wrote: > > To support legacy gamma ioctls the drivers need to set > > drm_crtc_funcs.gamma_set either to a custom implementation or to > > drm_atomic_helper_legacy_gamma_set.

Re: [PATCH v3 1/2] drm: automatic legacy gamma support

2020-12-10 Thread Daniel Vetter
On Thu, Dec 10, 2020 at 04:08:51PM +0200, Tomi Valkeinen wrote: > To support legacy gamma ioctls the drivers need to set > drm_crtc_funcs.gamma_set either to a custom implementation or to > drm_atomic_helper_legacy_gamma_set. Most of the atomic drivers do the > latter. > > We can simplify this by