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: jd9365da: Add the function of adjusting orientation

This driver does not have the function to adjust the orientation,
so this function is added.

Signed-off-by: Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Link: https://lore.kernel.org/r/20240624141926.5250-6-lvzhaoxiong@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240624141926.5250-6-lvzhaoxiong@huaqin.corp-partner.google.com

authored by

Zhaoxiong Lv and committed by
Neil Armstrong
e1c55089 2b976ad7

+13 -1
+13 -1
drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
··· 42 42 struct drm_panel panel; 43 43 struct mipi_dsi_device *dsi; 44 44 const struct jadard_panel_desc *desc; 45 - 45 + enum drm_panel_orientation orientation; 46 46 struct regulator *vdd; 47 47 struct regulator *vccio; 48 48 struct gpio_desc *reset; ··· 178 178 return 1; 179 179 } 180 180 181 + static enum drm_panel_orientation jadard_panel_get_orientation(struct drm_panel *panel) 182 + { 183 + struct jadard *jadard = panel_to_jadard(panel); 184 + 185 + return jadard->orientation; 186 + } 187 + 181 188 static const struct drm_panel_funcs jadard_funcs = { 182 189 .disable = jadard_disable, 183 190 .unprepare = jadard_unprepare, 184 191 .prepare = jadard_prepare, 185 192 .enable = jadard_enable, 186 193 .get_modes = jadard_get_modes, 194 + .get_orientation = jadard_panel_get_orientation, 187 195 }; 188 196 189 197 static int radxa_display_8hd_ad002_init_cmds(struct jadard *jadard) ··· 887 879 888 880 drm_panel_init(&jadard->panel, dev, &jadard_funcs, 889 881 DRM_MODE_CONNECTOR_DSI); 882 + 883 + ret = of_drm_get_panel_orientation(dev->of_node, &jadard->orientation); 884 + if (ret < 0) 885 + return dev_err_probe(dev, ret, "failed to get orientation\n"); 890 886 891 887 ret = drm_panel_of_backlight(&jadard->panel); 892 888 if (ret)