mirror of
https://github.com/revyos/thead-kernel.git
synced 2026-06-21 09:12:26 +02:00
add orientation of lichee console 4a panel
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
This commit is contained in:
@@ -49,6 +49,7 @@ struct panel_minjun_info {
|
||||
struct regulator *hsvcc;
|
||||
struct regulator *vspn3v3;
|
||||
|
||||
enum drm_panel_orientation orientation;
|
||||
bool prepared;
|
||||
bool enabled;
|
||||
};
|
||||
@@ -213,6 +214,7 @@ static int mingjun_get_modes(struct drm_panel *panel,
|
||||
|
||||
connector->display_info.width_mm = mode->width_mm;
|
||||
connector->display_info.height_mm = mode->height_mm;
|
||||
drm_connector_set_panel_orientation(connector, pinfo->orientation);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -525,6 +527,10 @@ static int mj070bi30ia2_panel_add(struct panel_minjun_info *pinfo)
|
||||
|
||||
drm_panel_init(&pinfo->base, dev, &panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation);
|
||||
if (ret < 0) {
|
||||
dev_warn(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
|
||||
}
|
||||
|
||||
ret = drm_panel_of_backlight(&pinfo->base);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user