Re: [PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-12-03 Thread Tomi Valkeinen
On 03/12/2020 14:31, Ville Syrjälä wrote: > BTW I have some gamma related stuff here > git://github.com/vsyrjala/linux.git fb_helper_c8_lut_4 > > which tries to fix some fb_helper gamma stuff, and I'm also > getting rid of the gamma_store stuff for the leacy uapi for > drivers which implement the

Re: [PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-12-03 Thread Ville Syrjälä
On Wed, Dec 02, 2020 at 01:38:42PM +0100, Daniel Vetter wrote: > On Wed, Dec 2, 2020 at 12:52 PM Tomi Valkeinen wrote: > > > > On 30/11/2020 16:10, Daniel Vetter wrote: > > > > > The thing is, the legacy helpers should be able to pull off what userspace > > > needs to do when it's using atomic any

Re: [PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-12-02 Thread Tomi Valkeinen
On 30/11/2020 16:10, Daniel Vetter wrote: > The thing is, the legacy helpers should be able to pull off what userspace > needs to do when it's using atomic anyway. Hard-coding information in the > kernel means we have a gap here. Hence imo legacy helpers doing the right > thing in all reasonable c

Re: [PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-12-02 Thread Daniel Vetter
On Wed, Dec 2, 2020 at 12:52 PM Tomi Valkeinen wrote: > > On 30/11/2020 16:10, Daniel Vetter wrote: > > > The thing is, the legacy helpers should be able to pull off what userspace > > needs to do when it's using atomic anyway. Hard-coding information in the > > kernel means we have a gap here. He

Re: [PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-11-30 Thread Tomi Valkeinen
On 30/11/2020 12:38, Laurent Pinchart wrote: >> + * can be used when the driver exposes either only GAMMA_LUT or both >> GAMMA_LUT >> + * and DEGAMMA_LUT. >> + */ >> +int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc, >> + u16 *red, u16 *green, u16 *bl

Re: [PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-11-30 Thread Daniel Vetter
On Mon, Nov 30, 2020 at 02:12:39PM +0200, Tomi Valkeinen wrote: > On 30/11/2020 12:38, Laurent Pinchart wrote: > > >> + * can be used when the driver exposes either only GAMMA_LUT or both > >> GAMMA_LUT > >> + * and DEGAMMA_LUT. > >> + */ > >> +int drm_atomic_helper_legacy_gamma_set(struct drm_cr

Re: [PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-11-30 Thread Laurent Pinchart
Hi Tomi, Thank you for the patch. On Tue, Nov 03, 2020 at 10:03:06AM +0200, Tomi Valkeinen wrote: > We currently have drm_atomic_helper_legacy_gamma_set() helper which can > be used to handle legacy gamma-set ioctl. > drm_atomic_helper_legacy_gamma_set() sets GAMMA_LUT, and clears > CTM and DEGAM

[PATCH v2 1/5] drm: add legacy support for using degamma for gamma

2020-11-03 Thread Tomi Valkeinen
We currently have drm_atomic_helper_legacy_gamma_set() helper which can be used to handle legacy gamma-set ioctl. drm_atomic_helper_legacy_gamma_set() sets GAMMA_LUT, and clears CTM and DEGAMMA_LUT. This works fine on HW where we have either: degamma -> ctm -> gamma -> out or ctm -> gamma -> out