diff mbox

drm: Fix DRM_FORCE_ON_DIGITAL use

Message ID 1415065905-8342-1-git-send-email-peter@hurleysoftware.com (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Hurley Nov. 4, 2014, 1:51 a.m. UTC
A connector may be forced on from the command line via video=
command line setting. The digital output of dual-mode connectors
can also be specifically selected and forced on; eg., 'video=DVI-I-2:D'.
However, in this case, the connector->status will be mistakenly set to
connector_status_disconnected, and the connector will not be mode set.

Fix the connector->status when connector->force is DRM_FORCE_ON_DIGITAL.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
 drivers/gpu/drm/drm_probe_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Daniel Vetter Nov. 4, 2014, 8:46 a.m. UTC | #1
On Mon, Nov 03, 2014 at 08:51:45PM -0500, Peter Hurley wrote:
> A connector may be forced on from the command line via video=
> command line setting. The digital output of dual-mode connectors
> can also be specifically selected and forced on; eg., 'video=DVI-I-2:D'.
> However, in this case, the connector->status will be mistakenly set to
> connector_status_disconnected, and the connector will not be mode set.
> 
> Fix the connector->status when connector->force is DRM_FORCE_ON_DIGITAL.
> 
> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>

Hm, this seems to have been broken since forever - I've added a note to
your patch about that and merged it into topic/core-stuff.
-Daniel
> ---
>  drivers/gpu/drm/drm_probe_helper.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 6857e9a..7483a47 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -118,7 +118,8 @@ static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect
>  		mode->status = MODE_UNVERIFIED;
>  
>  	if (connector->force) {
> -		if (connector->force == DRM_FORCE_ON)
> +		if (connector->force == DRM_FORCE_ON ||
> +		    connector->force == DRM_FORCE_ON_DIGITAL)
>  			connector->status = connector_status_connected;
>  		else
>  			connector->status = connector_status_disconnected;
> -- 
> 2.1.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 6857e9a..7483a47 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -118,7 +118,8 @@  static int drm_helper_probe_single_connector_modes_merge_bits(struct drm_connect
 		mode->status = MODE_UNVERIFIED;
 
 	if (connector->force) {
-		if (connector->force == DRM_FORCE_ON)
+		if (connector->force == DRM_FORCE_ON ||
+		    connector->force == DRM_FORCE_ON_DIGITAL)
 			connector->status = connector_status_connected;
 		else
 			connector->status = connector_status_disconnected;