]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: platform: synopsys: hdmirx: Optimize struct snps_hdmirx_dev
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Thu, 6 Mar 2025 08:05:33 +0000 (11:05 +0300)
committerHans Verkuil <hverkuil@xs4all.nl>
Thu, 6 Mar 2025 16:28:31 +0000 (17:28 +0100)
Move cached EDID that takes 512 bytes to the bottom of struct
snps_hdmirx_dev to improve CPU's cache locality of the struct.

Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c

index 981ab96cda3cc84598599a2b4129c899e2be8582..4d42da7255f32585188d7b08acc8c6f830b3a6f7 100644 (file)
@@ -154,8 +154,8 @@ struct snps_hdmirx_dev {
        u32 edid_blocks_written;
        u32 cur_fmt_fourcc;
        u32 color_depth;
-       u8 edid[EDID_NUM_BLOCKS_MAX * EDID_BLOCK_SIZE];
        spinlock_t rst_lock; /* to lock register access */
+       u8 edid[EDID_NUM_BLOCKS_MAX * EDID_BLOCK_SIZE];
 };
 
 static const struct v4l2_dv_timings cea640x480 = V4L2_DV_BT_CEA_640X480P59_94;