Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/display: hdmi_state_helper: don't generate unsupported InfoFrames

There is little point in generating InfoFrames which are not supported
by the driver. Skip generating the unsupported InfoFrames, making sure
that the kernel never tries to write the unsupported frame. As there are
no remaining usecases, change write_infoframe / clear_infoframe helpers
return an error if the corresponding callback is NULL.

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260107-limit-infoframes-2-v4-8-213d0d3bd490@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

+8 -2
+8 -2
drivers/gpu/drm/display/drm_hdmi_state_helper.c
··· 718 718 719 719 infoframe->set = false; 720 720 721 + if (!connector->hdmi.funcs->spd.write_infoframe) 722 + return 0; 723 + 721 724 ret = hdmi_spd_infoframe_init(frame, 722 725 connector->hdmi.vendor, 723 726 connector->hdmi.product); ··· 744 741 int ret; 745 742 746 743 infoframe->set = false; 744 + 745 + if (!connector->hdmi.funcs->hdr_drm.write_infoframe) 746 + return 0; 747 747 748 748 if (connector->max_bpc < 10) 749 749 return 0; ··· 908 902 909 903 if (!funcs->clear_infoframe) { 910 904 drm_dbg_kms(dev, "Function not implemented, bailing.\n"); 911 - return 0; 905 + return -EOPNOTSUPP; 912 906 } 913 907 914 908 ret = funcs->clear_infoframe(connector); ··· 934 928 935 929 if (!funcs->write_infoframe) { 936 930 drm_dbg_kms(dev, "Function not implemented, bailing.\n"); 937 - return 0; /* XXX: temporal until we stop generating unsupported frames */ 931 + return -EOPNOTSUPP; 938 932 } 939 933 940 934 len = hdmi_infoframe_pack(&new_frame->data, buffer, sizeof(buffer));