Message ID | 20211016184226.3862-7-cssk@net-c.es (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | replace drm_detect_hdmi_monitor() with drm_display_info.is_hdmi | expand |
Hi, 21. 10. 17. 오전 3:42에 Claudio Suarez 이(가) 쓴 글: > Once EDID is parsed, the monitor HDMI support information is available > through drm_display_info.is_hdmi. Retriving the same information with > drm_detect_hdmi_monitor() is less efficient. Change to > drm_display_info.is_hdmi > > Signed-off-by: Claudio Suarez <cssk@net-c.es> > --- > drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions( > > diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c > index 7655142a4651..a563d6386abe 100644 > --- a/drivers/gpu/drm/exynos/exynos_hdmi.c > +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c > @@ -893,12 +893,14 @@ static int hdmi_get_modes(struct drm_connector *connector) > if (!edid) > return -ENODEV; > > - hdata->dvi_mode = !drm_detect_hdmi_monitor(edid); > + /* This updates connector->display_info */ > + drm_connector_update_edid_property(connector, edid); > + > + hdata->dvi_mode = !connector->display_info.is_hdmi; Thanks for correcting this. Yeah, we should use drm_display_info.is_hdmi parsed from EDID. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/drm_edid.c?h=v5.14.14#n4725 Signed-off-by: Inki Dae <inki.dae@samsung.com> Thanks, Inki Dae > DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n", > (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"), > edid->width_cm, edid->height_cm); > > - drm_connector_update_edid_property(connector, edid); > cec_notifier_set_phys_addr_from_edid(hdata->notifier, edid); > > ret = drm_add_edid_modes(connector, edid); >
21. 10. 27. 오전 7:28에 Inki Dae 이(가) 쓴 글: > Hi, > > 21. 10. 17. 오전 3:42에 Claudio Suarez 이(가) 쓴 글: >> Once EDID is parsed, the monitor HDMI support information is available >> through drm_display_info.is_hdmi. Retriving the same information with >> drm_detect_hdmi_monitor() is less efficient. Change to >> drm_display_info.is_hdmi >> >> Signed-off-by: Claudio Suarez <cssk@net-c.es> >> --- >> drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions( >> >> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c >> index 7655142a4651..a563d6386abe 100644 >> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c >> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c >> @@ -893,12 +893,14 @@ static int hdmi_get_modes(struct drm_connector *connector) >> if (!edid) >> return -ENODEV; >> >> - hdata->dvi_mode = !drm_detect_hdmi_monitor(edid); >> + /* This updates connector->display_info */ >> + drm_connector_update_edid_property(connector, edid); >> + >> + hdata->dvi_mode = !connector->display_info.is_hdmi; > > Thanks for correcting this. Yeah, we should use drm_display_info.is_hdmi parsed from EDID. > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/drm_edid.c?h=v5.14.14#n4725 > > Signed-off-by: Inki Dae <inki.dae@samsung.com> My mistake. Please, ignore above Signed-off-by. Acked-by : Inki Dae <inki.dae@samsung.com> instead. Thanks, Inki Dae > > Thanks, > Inki Dae > >> DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n", >> (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"), >> edid->width_cm, edid->height_cm); >> >> - drm_connector_update_edid_property(connector, edid); >> cec_notifier_set_phys_addr_from_edid(hdata->notifier, edid); >> >> ret = drm_add_edid_modes(connector, edid); >> >
On Wed, Oct 27, 2021 at 07:28:45AM +0900, Inki Dae wrote: > Hi, > > 21. 10. 17. 오전 3:42에 Claudio Suarez 이(가) 쓴 글: > > Once EDID is parsed, the monitor HDMI support information is available > > through drm_display_info.is_hdmi. Retriving the same information with > > drm_detect_hdmi_monitor() is less efficient. Change to > > drm_display_info.is_hdmi > > > > Signed-off-by: Claudio Suarez <cssk@net-c.es> > > --- > > drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions( > > > > diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c > > index 7655142a4651..a563d6386abe 100644 > > --- a/drivers/gpu/drm/exynos/exynos_hdmi.c > > +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c > > @@ -893,12 +893,14 @@ static int hdmi_get_modes(struct drm_connector *connector) > > if (!edid) > > return -ENODEV; > > > > - hdata->dvi_mode = !drm_detect_hdmi_monitor(edid); > > + /* This updates connector->display_info */ > > + drm_connector_update_edid_property(connector, edid); > > + > > + hdata->dvi_mode = !connector->display_info.is_hdmi; > > Thanks for correcting this. Yeah, we should use drm_display_info.is_hdmi parsed from EDID. > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/gpu/drm/drm_edid.c?h=v5.14.14#n4725 > > Signed-off-by: Inki Dae <inki.dae@samsung.com> Thank you, Inki. Best regards Claudio Suarez
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 7655142a4651..a563d6386abe 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -893,12 +893,14 @@ static int hdmi_get_modes(struct drm_connector *connector) if (!edid) return -ENODEV; - hdata->dvi_mode = !drm_detect_hdmi_monitor(edid); + /* This updates connector->display_info */ + drm_connector_update_edid_property(connector, edid); + + hdata->dvi_mode = !connector->display_info.is_hdmi; DRM_DEV_DEBUG_KMS(hdata->dev, "%s : width[%d] x height[%d]\n", (hdata->dvi_mode ? "dvi monitor" : "hdmi monitor"), edid->width_cm, edid->height_cm); - drm_connector_update_edid_property(connector, edid); cec_notifier_set_phys_addr_from_edid(hdata->notifier, edid); ret = drm_add_edid_modes(connector, edid);
Once EDID is parsed, the monitor HDMI support information is available through drm_display_info.is_hdmi. Retriving the same information with drm_detect_hdmi_monitor() is less efficient. Change to drm_display_info.is_hdmi Signed-off-by: Claudio Suarez <cssk@net-c.es> --- drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)