lkml.org 
[lkml]   [2022]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")
On Fri, May 27, 2022 at 4:41 PM Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
>
> I just tested with various values, sizeof(*edid) is 144 bytes at that place.

Hmm. What compiler do you have? Because it seems very broken.

You don't actually have to try with various sizes, you could have just
done something like

int size_of_edid(const struct edid *edid)
{
return sizeof(*edid);
}

and then "make drivers/gpu/drm/drm_edid.s" to generate assembly and
see what it looks like (obviously removing the BUG_ON() in order to
build).

That obviously generates code like

movl $128, %eax
ret

for me, and looking at the definition of that type I really can't see
how it would ever generate anything else. But it's apparently not even
close for you.

I suspect some of the structs inside of that 'struct edid' end up
getting aligned, despite the '__attribute__((packed))'. For example,
'struct est_timings' is supposed to be just 3 bytes, and it's at an
odd offset too (byte offset 35 in the 'struct edid' if I did the math
correctly).

But it obviously doesn't happen for me or for most other people, so
it's something in your setup. Unusual compiler?

Linus

\
 
 \ /
  Last update: 2022-05-28 03:05    [W:0.430 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site