Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-06 Thread Peter Rosin
On 2017-07-06 07:55, Daniel Vetter wrote: > On Wed, Jul 5, 2017 at 7:50 PM, Peter Rosin wrote: +retry: +ret = drm_modeset_lock_all_ctx(dev, ); >>> >>> With atomic you don't need to grab locks, this is done behind the scenes >>> (as long as you handle the

Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-06 Thread Daniel Vetter
> >> @@ -1369,27 +1362,57 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, > >> struct fb_info *info) > >>memcpy(g + cmap->start, cmap->green, cmap->len * sizeof(*g)); > >>memcpy(b + cmap->start, cmap->blue, cmap->len * sizeof(*b)); > >> > >> - for (j = 0; j <

Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-05 Thread Daniel Vetter
On Wed, Jul 5, 2017 at 7:50 PM, Peter Rosin wrote: >>> +retry: >>> +ret = drm_modeset_lock_all_ctx(dev, ); >> >> With atomic you don't need to grab locks, this is done behind the scenes >> (as long as you handle the retry/backoff correctly). See the kerneldoc for >> the

Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-05 Thread Peter Rosin
On 2017-07-05 08:21, Daniel Vetter wrote: > On Tue, Jul 04, 2017 at 12:37:01PM +0200, Peter Rosin wrote: >> This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get >> completely obsolete. >> >> Signed-off-by: Peter Rosin >> --- >> drivers/gpu/drm/drm_fb_helper.c

Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set

2017-07-05 Thread Daniel Vetter
On Tue, Jul 04, 2017 at 12:37:01PM +0200, Peter Rosin wrote: > This makes the redundant fb helpers .load_lut, .gamma_set and .gamma_get > completely obsolete. > > Signed-off-by: Peter Rosin > --- > drivers/gpu/drm/drm_fb_helper.c | 165 >