All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/edid: drop the dcc probe before drm_do_get_edid
@ 2018-02-10 18:03 Lubomir Rintel
  2018-02-11 10:56 ` Lubomir Rintel
  0 siblings, 1 reply; 3+ messages in thread
From: Lubomir Rintel @ 2018-02-10 18:03 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-kernel, David Airlie, Daniel Vetter, Sean Paul,
	Lubomir Rintel, Jani Nikula

Now that drm_do_get_edid() handles override and firmware EDIDs it makes
no sense to conditionalize it with a DCC probe. On the contrary -- the
overrides are useful specifically when DCC is not functioning.

drm_do_get_edid() already bails out when DCC fails, there's no need for
an extra check. It seems entirely safe to just drop this.

Working around the issue by forcing the connector on is not a good
solution because that way the desktop shell can't tell when a monitor is
plugged in or removed.

Cc: Jani Nikula <jani.nikula@intel.com>
Fixes: 53fd40a ("drm: handle override and firmware EDID at drm_do_get_edid() level")
---
 drivers/gpu/drm/drm_edid.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index cb487148359a..72169d84256d 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1642,21 +1642,6 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
 }
 EXPORT_SYMBOL_GPL(drm_do_get_edid);
 
-/**
- * drm_probe_ddc() - probe DDC presence
- * @adapter: I2C adapter to probe
- *
- * Return: True on success, false on failure.
- */
-bool
-drm_probe_ddc(struct i2c_adapter *adapter)
-{
-	unsigned char out;
-
-	return (drm_do_probe_ddc_edid(adapter, &out, 0, 1) == 0);
-}
-EXPORT_SYMBOL(drm_probe_ddc);
-
 /**
  * drm_get_edid - get EDID data, if available
  * @connector: connector we're probing
@@ -1675,9 +1660,6 @@ struct edid *drm_get_edid(struct drm_connector *connector,
 	if (connector->force == DRM_FORCE_OFF)
 		return NULL;
 
-	if (connector->force == DRM_FORCE_UNSPECIFIED && !drm_probe_ddc(adapter))
-		return NULL;
-
 	edid = drm_do_get_edid(connector, drm_do_probe_ddc_edid, adapter);
 	if (edid)
 		drm_get_displayid(connector, edid);
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/edid: drop the dcc probe before drm_do_get_edid
  2018-02-10 18:03 [PATCH] drm/edid: drop the dcc probe before drm_do_get_edid Lubomir Rintel
@ 2018-02-11 10:56 ` Lubomir Rintel
  2018-02-12  9:39   ` Jani Nikula
  0 siblings, 1 reply; 3+ messages in thread
From: Lubomir Rintel @ 2018-02-11 10:56 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-kernel, David Airlie, Daniel Vetter, Sean Paul, Jani Nikula

On Sat, 2018-02-10 at 19:03 +0100, Lubomir Rintel wrote:
> Now that drm_do_get_edid() handles override and firmware EDIDs it makes
> no sense to conditionalize it with a DCC probe. On the contrary -- the
> overrides are useful specifically when DCC is not functioning.
> 
> drm_do_get_edid() already bails out when DCC fails, there's no need for
> an extra check. It seems entirely safe to just drop this.
> 
> Working around the issue by forcing the connector on is not a good
> solution because that way the desktop shell can't tell when a monitor is
> plugged in or removed.
> 
> Cc: Jani Nikula <jani.nikula@intel.com>
> Fixes: 53fd40a ("drm: handle override and firmware EDID at drm_do_get_edid() level")

Please disregard this, should have given it more thought. Sorry.

It removes a symbol other modules use, and typoes DDC/DCC in the commit
message. Moreover it doesn't actually seem to solve my problem -- will
try to follow up with a better fix.

Lubo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/edid: drop the dcc probe before drm_do_get_edid
  2018-02-11 10:56 ` Lubomir Rintel
@ 2018-02-12  9:39   ` Jani Nikula
  0 siblings, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2018-02-12  9:39 UTC (permalink / raw)
  To: Lubomir Rintel, dri-devel
  Cc: linux-kernel, David Airlie, Daniel Vetter, Sean Paul

On Sun, 11 Feb 2018, Lubomir Rintel <lkundrak@v3.sk> wrote:
> On Sat, 2018-02-10 at 19:03 +0100, Lubomir Rintel wrote:
>> Now that drm_do_get_edid() handles override and firmware EDIDs it makes
>> no sense to conditionalize it with a DCC probe. On the contrary -- the
>> overrides are useful specifically when DCC is not functioning.
>> 
>> drm_do_get_edid() already bails out when DCC fails, there's no need for
>> an extra check. It seems entirely safe to just drop this.
>> 
>> Working around the issue by forcing the connector on is not a good
>> solution because that way the desktop shell can't tell when a monitor is
>> plugged in or removed.
>> 
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Fixes: 53fd40a ("drm: handle override and firmware EDID at drm_do_get_edid() level")
>
> Please disregard this, should have given it more thought. Sorry.
>
> It removes a symbol other modules use, and typoes DDC/DCC in the commit
> message. Moreover it doesn't actually seem to solve my problem -- will
> try to follow up with a better fix.

I think the ddc probe was originally added for a reason. What that
reason was, I have no idea. I suggest you go on a bit of git blame/log
history digging to find what it was before removing.

Anyway, as you can see from the code, you can still use connector
forcing to bypass the ddc check.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-12  9:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-10 18:03 [PATCH] drm/edid: drop the dcc probe before drm_do_get_edid Lubomir Rintel
2018-02-11 10:56 ` Lubomir Rintel
2018-02-12  9:39   ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.