Messages in this thread | | | From | Chun-Kuang Hu <> | Date | Thu, 16 Dec 2021 00:14:36 +0800 | Subject | Re: [PATCH] mediatek: Set default value for Panel Orientation connector prop. |
| |
Hi, Mark:
Mark Yacoub <markyacoub@chromium.org> 於 2021年12月14日 週二 下午11:13寫道: > > Hey CK, can we have this merged? > Thank you! > > On Mon, Oct 25, 2021 at 9:13 PM Sean Paul <sean@poorly.run> wrote: > > > > On Fri, Oct 22, 2021 at 01:24:03PM -0400, Mark Yacoub wrote: > > > From: Mark Yacoub <markyacoub@chromium.org> > > > > > > [Why] > > > Creating the prop uses UNKNOWN as the initial value, which is not a > > > supported value if the props is to be supported. > > > > > > [How] > > > Set the panel orientation default value to NORMAL right after creating > > > the prop. > > > > Reviewed-by: Sean Paul <seanpaul@chromium.org> > > > > > > > > Tested on Jacuzzi(MTK) > > > Fixes IGT@kms_properties@get_properties-sanity-{atomic,non-atomic} > > > > > > Signed-off-by: Mark Yacoub <markyacoub@chromium.org> > > > --- > > > drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c > > > index 0ad7157660afa..b7c2528a8f41c 100644 > > > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > > > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > > > @@ -1039,6 +1039,8 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi) > > > DRM_ERROR("Unable to init panel orientation\n"); > > > goto err_cleanup_encoder; > > > } > > > + drm_connector_set_panel_orientation(dsi->connector, > > > + DRM_MODE_PANEL_ORIENTATION_NORMAL);
In drm_connector_set_panel_orientation() [1], I find that the orientation could be set only once. Once you set it to normal, it could not be set to other orientation. Right?
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/drm_connector.c?h=v5.16-rc5#n2302
Regards, Chun-Kuang.
> > > > > > drm_connector_attach_encoder(dsi->connector, &dsi->encoder); > > > > > > -- > > > 2.33.0.1079.g6e70778dc9-goog > > > > > > > -- > > Sean Paul, Software Engineer, Google / Chromium OS
| |