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/panel: sitronix-st7703: Don't call disable at shutdown/remove

It's the responsibility of a correctly written DRM modeset driver to
call drm_atomic_helper_shutdown() at shutdown time and that should be
disabling / unpreparing the panel if needed. Panel drivers shouldn't
be calling these functions themselves.

A recent effort was made to fix as many DRM modeset drivers as
possible [1] [2] [3] and most drivers are fixed now.

The compatible strings used by this driver seem to show up across
boards using a variety of DRM drivers. It appears that the relevant
drivers have been converted, but at least one compatible string
doesn't seem to be found in any mainline dts files so we can't be 100%
sure. If it is found that the DRM modeset driver hasn't been fixed
then this patch could be temporarily reverted until it is.

[1] https://lore.kernel.org/r/20230901234015.566018-1-dianders@chromium.org
[2] https://lore.kernel.org/r/20230901234202.566951-1-dianders@chromium.org
[3] https://lore.kernel.org/r/20230921192749.1542462-1-dianders@chromium.org

Cc: Guido Günther <agx@sigxcpu.org>
Cc: Ondřej Jirman <megi@xff.cz>
Cc: Chris Morgan <macromorgan@hotmail.com>
Cc: Frank Oltmanns <frank@oltmanns.dev>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.43.I08ba0d4e2d534c06ab0ede9c148bb14cc7c1a9d7@changeid

-17
-17
drivers/gpu/drm/panel/panel-sitronix-st7703.c
··· 937 937 return 0; 938 938 } 939 939 940 - static void st7703_shutdown(struct mipi_dsi_device *dsi) 941 - { 942 - struct st7703 *ctx = mipi_dsi_get_drvdata(dsi); 943 - int ret; 944 - 945 - ret = drm_panel_unprepare(&ctx->panel); 946 - if (ret < 0) 947 - dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret); 948 - 949 - ret = drm_panel_disable(&ctx->panel); 950 - if (ret < 0) 951 - dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); 952 - } 953 - 954 940 static void st7703_remove(struct mipi_dsi_device *dsi) 955 941 { 956 942 struct st7703 *ctx = mipi_dsi_get_drvdata(dsi); 957 943 int ret; 958 - 959 - st7703_shutdown(dsi); 960 944 961 945 ret = mipi_dsi_detach(dsi); 962 946 if (ret < 0) ··· 965 981 static struct mipi_dsi_driver st7703_driver = { 966 982 .probe = st7703_probe, 967 983 .remove = st7703_remove, 968 - .shutdown = st7703_shutdown, 969 984 .driver = { 970 985 .name = DRV_NAME, 971 986 .of_match_table = st7703_of_match,