lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <acvk_AR9o8iB8dRnYZrKp6ylhzAjl5oZyE6oBIKWQttckNesM1-5k9b71jDIRhoYRwx75xe-6_mM8a0p4e15NMapX1GjdDLqPPoKZDN8U1A=@proton.me>
Date: Tue, 20 Aug 2024 20:42:15 +0000
From: Piotr Zalewski <pZ010001011111@...ton.me>
To: Andy Yan <andyshrk@....com>
Cc: hjc@...k-chips.com, heiko@...ech.de, andy.yan@...k-chips.com, maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com, daniel@...ll.ch, dri-devel@...ts.freedesktop.org, linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org, Daniel Stone <daniel@...ishbar.org>, Dragan Simic <dsimic@...jaro.org>, Diederik de Haas <didi.debian@...ow.org>
Subject: Re:[PATCH v4] rockchip/drm: vop2: add support for gamma LUT



On Tuesday, August 20th, 2024 at 3:12 AM, Andy Yan <andyshrk@....com> wrote:

> 
> Hi Piotr,

Hi Andy!

> > +static int vop2_crtc_atomic_check_gamma(struct vop2_video_port *vp,
> > + struct drm_crtc *crtc,
> > + struct drm_atomic_state *state,
> > + struct drm_crtc_state *crtc_state)
> > +{
> > + struct vop2 *vop2 = vp->vop2;
> > + unsigned int len;
> > +
> > + if (!vp->vop2->lut_regs || !crtc_state->color_mgmt_changed ||
> > + !crtc_state->gamma_lut)
> > + return 0;
> > +
> > + len = drm_color_lut_size(crtc_state->gamma_lut);
> > + if (len != crtc->gamma_size) {
> > + DRM_DEBUG_KMS("Invalid LUT size; got %d, expected %d\n",
> > + len, crtc->gamma_size);
> > + return -EINVAL;
> > + }
> > +
> > + // trigger full modeset only when SoC is 356x
> > + if (!crtc_state->mode_changed && (vop2->data->soc_id == 3566 ||
> > + vop2->data->soc_id == 3568)) {
> > + int ret;
> > +
> > + crtc_state->mode_changed = true;
> > + state->allow_modeset = true;
> 
> 
> 
> 
> We don't need to trigger a modeset here. We just need to disable dsp_lut befor we write gamma lut data for rk3566/8.

Formerly my patch didn't trigger a modeset. Though Daniel Stone in his 
reply to v3[1] suggested it as the clean way to handle RK356x case[2], 
quote, "it would probably be better to set mode_changed when the colour 
management configuration changes". Let's wait for his reply to this 
version of the patch, perhaps he meant something different or not exactly 
what I did.

[1] https://lore.kernel.org/linux-rockchip/CAPj87rOM=j0zmuWL9frGKV1xzPbJrk=Q9ip7F_HAPYnbCqPouw@mail.gmail.com/
[2] https://lore.kernel.org/linux-rockchip/TkgKVivuaLFLILPY-n3iZo_8KF-daKdqdu-0_e0HP-5Ar_8DALDeNWog2suwWKjX7eomcbGET0KZe7DlzdhK2YM6CbLbeKeFZr-MJzJMtw0=@proton.me/

Best Regards, Piotr Zalewski


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ