Re: [PATCH] drm/tests: Move test EDID data to separate .c file
From: Maxime Ripard
Date: Wed Jun 10 2026 - 09:24:18 EST
On Wed, Jun 10, 2026 at 03:32:12PM +0300, Jani Nikula wrote:
> On Wed, 10 Jun 2026, Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx> wrote:
> > Having the test EDID arrays defined in the .h directly will duplicate
> > them across every user of the EDID arrays. This works fine as long as
> > there's only one user, but may produce build warnings/errors when there
> > are multiple users and not all of them use all definitions.
> >
> > Move the array definitions to a new .c file, and mark the declarations
> > in the header as "extern" to avoid the linker throwing a fit, and give
> > them an explicit size (either 128 or 256, depending on EDID) to avoid
> > the compiler inferring that they must be size 1.
> >
> > Reported-by: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
> > Closes: https://lore.kernel.org/r/04ff70850213ae0f75486b1a27a7edb6fb4e71c3@xxxxxxxxx/
> > Fixes: ce1d0139adac ("drm/tests: bridge: Add test for HDMI output bus formats helper")
> > Fixes: 082fbc179c01 ("drm/tests: bridge: Add KUnit tests for bridge chain format selection")
> > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
>
> Thanks for doing this.
>
> I think I would've also moved the comments with the edid-decode
> results. Matter of taste I guess.
>
> Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>
Yeah, I agree but since it fixes a compilation warning it can be done as
a subsequent patch.
Acked-by: Maxime Ripard <mripard@xxxxxxxxxx>
Maxime
Attachment:
signature.asc
Description: PGP signature