public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Johan Jonker <jbx6244-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: Re: [PATCH v5 1/5] drm: rockchip: introduce rk3066 hdmi
Date: Thu, 21 Mar 2019 21:35:45 +0100	[thread overview]
Message-ID: <fe1b8049-37be-f911-ec5e-399875db46fe@gmail.com> (raw)
In-Reply-To: <20190321001440.31057-2-jbx6244-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hi,

On Heiko's request the function rk3066_hdmi_connector_get_modes() was
made equel to the inno driver. The variable "sink_is_hdmi" now only
changes with valid edid. What happens if we plug in a device with valid
hdmi video and then with something wrong with edid then "sink_is_hdmi"
never turns false. Shouldn't we add an extra statement in this and in
the inno driver that makes sure that "sink_is_hdmi" is false in all
other cases? Please advise.


+static int rk3066_hdmi_connector_get_modes(struct drm_connector *connector)
+{
+	struct rk3066_hdmi *hdmi = to_rk3066_hdmi(connector);
+	struct edid *edid;
+	int ret = 0;
+
+	if (!hdmi->ddc)
+		return 0;
+

Add extra statement here:
	hdmi->hdmi_data.sink_is_hdmi = false;

+	edid = drm_get_edid(connector, hdmi->ddc);
+	if (edid) {
+		hdmi->hdmi_data.sink_is_hdmi = drm_detect_hdmi_monitor(edid);
+		drm_connector_update_edid_property(connector, edid);
+		ret = drm_add_edid_modes(connector, edid);
+		kfree(edid);
+	}
+
+	return ret;
+}

  parent reply	other threads:[~2019-03-21 20:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21  0:14 [PATCH v5 0/5] Enable rk3066 VOP and HDMI for MK808 Johan Jonker
2019-03-21  0:14 ` [PATCH v5 1/5] drm: rockchip: introduce rk3066 hdmi Johan Jonker
     [not found]   ` <20190321001440.31057-2-jbx6244-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-03-21 20:35     ` Johan Jonker [this message]
     [not found]       ` <fe1b8049-37be-f911-ec5e-399875db46fe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-03-25 23:57         ` Johan Jonker
2019-03-21  0:14 ` [PATCH v5 2/5] ARM: dts: rockchip: add rk3066 hdmi nodes Johan Jonker
2019-03-21  0:14 ` [PATCH v5 3/5] ARM: dts: rockchip: rk3066a-mk808: enable vop0 and " Johan Jonker
2019-03-21  0:14 ` [PATCH v5 4/5] dt-bindings: display: rockchip: add document for rk3066 hdmi Johan Jonker
2019-03-21  0:14 ` [PATCH v5 5/5] drm: rockchip: add fixed screen size DVI-D support " Johan Jonker
2019-03-31 16:19   ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe1b8049-37be-f911-ec5e-399875db46fe@gmail.com \
    --to=jbx6244-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox