Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682191

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

From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
Date 2017-07-06 10:40 +0200
Message-ID <u0aun-1Sl-31@gated-at.bofh.it> (permalink)
References <tZLFE-2ti-5@gated-at.bofh.it> <tZLYZ-2A3-3@gated-at.bofh.it> <tZLYZ-2A3-1@gated-at.bofh.it> <u07Zw-i3-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> >> @@ -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 < cmap->len; j++) {
> >> -			u16 hred, hgreen, hblue, htransp = 0xffff;
> >> +		ret = crtc->funcs->gamma_set(crtc, r, g, b,
> >> +					     crtc->gamma_size, crtc_state);
> > 
> > I guess my description of what I have in mind wasn't really clear. I think
> > a proper atomic commit should never reuse one of the old hooks
> > (->gamma_set) here, that's just confusing. Instead what I had in mind is
> > to do the proper adjusting that gamma_set does here in this function, i.e.
> > 
> > - create the new blob, fill it with the cmap data
> > 
> > - assign that blob to the crtc state:
> > 
> > 	drm_atomic_replace_property_blob(&crtc_state->gamma_lut,
> > 					 new_table, &temp);
> 
> That function is static, and...

Missed these comments here. I think we should just make them unstatic,
that might also explain why gamma_set is going this indirect path. Means
we need some kerneldoc, but that's not much work. Ping the original author
if you have questions.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper  in terms of crtc .gamma_set Daniel Vetter <daniel@ffwll.ch> - 2017-07-05 08:30 +0200
  Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper in  terms of crtc .gamma_set Daniel Vetter <daniel@ffwll.ch> - 2017-07-06 08:00 +0200
  Re: [PATCH v3 05/16] drm/fb-helper: do a generic fb_setcmap helper  in terms of crtc .gamma_set Daniel Vetter <daniel@ffwll.ch> - 2017-07-06 10:40 +0200

csiph-web