Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] drm/vkms: undeclared DRM_COLOROP_1D_CURVE_GAMMA24 constants
  break build
- [Low] drm/vkms: unconditional EXPORT_SYMBOL() for KUnit-only Gamma 2.4
  LUTs
--

commit b3b9cea1bd79f0143afef4e7f802c85dcba7344f
Author: Robert Mader <[email protected]>

drm/vkms: Add support for DRM_COLOROP_1D_CURVE_GAMMA24

This commit adds lookup tables and colorop handling for the Gamma 2.4
1D curve and its inverse in VKMS, along with a corresponding KUnit test
and script entry.

> diff --git a/drivers/gpu/drm/vkms/vkms_colorop.c 
> b/drivers/gpu/drm/vkms/vkms_colorop.c
> index 625a590c6a2fe..db16d7e2a42fe 100644
> --- a/drivers/gpu/drm/vkms/vkms_colorop.c
> +++ b/drivers/gpu/drm/vkms/vkms_colorop.c
> @@ -12,7 +12,9 @@ static const u64 supported_tfs =
>       BIT(DRM_COLOROP_1D_CURVE_SRGB_EOTF) |
>       BIT(DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF) |
>       BIT(DRM_COLOROP_1D_CURVE_GAMMA22) |
> -     BIT(DRM_COLOROP_1D_CURVE_GAMMA22_INV);
> +     BIT(DRM_COLOROP_1D_CURVE_GAMMA22_INV) |
> +     BIT(DRM_COLOROP_1D_CURVE_GAMMA24) |
> +     BIT(DRM_COLOROP_1D_CURVE_GAMMA24_INV);

[Severity: High]
Are DRM_COLOROP_1D_CURVE_GAMMA24 and DRM_COLOROP_1D_CURVE_GAMMA24_INV
defined in enum drm_colorop_curve_1d_type?

Both constants are missing from include/drm/drm_colorop.h, and
colorop_curve_1d_type_names[] in drivers/gpu/drm/drm_colorop.c has no
entries for them.  With CONFIG_DRM_VKMS enabled, this breaks compilation
of vkms_colorop.c and apply_colorop() in vkms_composer.c.

It looks like a prerequisite DRM core patch adding these enum values and
their property name strings is missing.

[ ... ]

> diff --git a/drivers/gpu/drm/vkms/vkms_luts.c 
> b/drivers/gpu/drm/vkms/vkms_luts.c
> index 5778226fc290f..90a717ced70cd 100644
> --- a/drivers/gpu/drm/vkms/vkms_luts.c
> +++ b/drivers/gpu/drm/vkms/vkms_luts.c

[ ... ]

> +const struct vkms_color_lut gamma24_eotf = {
> +     .x = pow24_x,
> +     .y = pow24_y,
> +     .lut_length = ARRAY_SIZE(pow24_y)
> +};
> +EXPORT_SYMBOL(gamma24_eotf);

[ ... ]

> +const struct vkms_color_lut gamma24_inv_eotf = {
> +     .x = pow24_inv_x,
> +     .y = pow24_inv_y,
> +     .lut_length = ARRAY_SIZE(pow24_inv_y)
> +};
> +EXPORT_SYMBOL(gamma24_inv_eotf);

[Severity: Low]
Should gamma24_eotf and gamma24_inv_eotf use EXPORT_SYMBOL_IF_KUNIT()
instead of EXPORT_SYMBOL()?

vkms_luts.o and vkms_composer.o are linked into the same vkms module, and
the only external user is vkms_color_test.c, which already imports the
EXPORTED_FOR_KUNIT_TESTING namespace.  Unconditional EXPORT_SYMBOL()
exposes these generic unprefixed names in the global symbol table even
when CONFIG_KUNIT is disabled.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=4

Reply via email to