FAILED: Patch "drm/bridge: lt8912b: do not return negative values from .get_modes()" failed to apply to 5.15-stable tree
Subsystems (5)
Sasha Levin
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 171b711b26cce208bb628526b1b368aeec7b6fa4 Mon Sep 17 00:00:00 2001
From: Jani Nikula <[email protected]>
Date: Fri, 8 Mar 2024 18:03:42 +0200
Subject: [PATCH] drm/bridge: lt8912b: do not return negative values from
.get_modes()
The .get_modes() hooks aren't supposed to return negative error codes. Return 0 for no modes, whatever the reason.
Cc Adrien Grassein <[email protected]>
Signed-off-by Jani Nikula <[email protected]>
--- drivers/gpu/drm/bridge/lontium-lt8912b.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
drivers/gpu/drm/bridge/lontium-lt8912b.c +7 -9
@@ -441,23 +441,21 @@ lt8912_connector_mode_valid(struct drm_connector *connector,static int lt8912_connector_get_modes (struct drm_connector *connector) {const struct drm_edid *drm_edid; -int ret =-1 ; -int num =0 ;struct lt8912 *lt =connector_to_lt8912 (connector);u32 bus_format =MEDIA_BUS_FMT_RGB888_1X24 ; +int ret, num; drm_edid =drm_bridge_edid_read (lt->hdmi_port, connector);drm_edid_connector_update (connector, drm_edid); -if (drm_edid) { - num =drm_edid_connector_add_modes (connector); - }else { -return ret; - } +if (!drm_edid) +return 0 ; + + num =drm_edid_connector_add_modes (connector); ret =drm_display_info_set_bus_formats (&connector->display_info, &bus_format,1 ); -if (ret) - num = ret; +if (ret <0 ) + num =0 ;drm_edid_free (drm_edid);return num;
Signature · 1 line
2.43.0