diff mbox series

[1/2] drm: virtual connectors can have edid too

Message ID 20181001121911.27140-2-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm/bochs: add edid support. | expand

Commit Message

Gerd Hoffmann Oct. 1, 2018, 12:19 p.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/drm_connector.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Daniel Vetter Oct. 1, 2018, 5:17 p.m. UTC | #1
On Mon, Oct 01, 2018 at 02:19:10PM +0200, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

This will add edid support to all virtual connectors. Probably a bit much,
and I don't think what everyone else wants for their virtual hw drivers.

I think better to wrap a new drm_connector_attach_edid_property(), which
virtual drivers can call when needed. Also: Might be good to update the
kerneldoc, and perhaps double-check no userspace will go boom on this
change (yes I'm paranoid).
-Daniel

> ---
>  drivers/gpu/drm/drm_connector.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 6011d769d5..95cbbf7ee5 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -254,8 +254,7 @@ int drm_connector_init(struct drm_device *dev,
>  	config->num_connector++;
>  	spin_unlock_irq(&config->connector_list_lock);
>  
> -	if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL &&
> -	    connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
> +	if (connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
>  		drm_object_attach_property(&connector->base,
>  					      config->edid_property,
>  					      0);
> -- 
> 2.9.3
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 6011d769d5..95cbbf7ee5 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -254,8 +254,7 @@  int drm_connector_init(struct drm_device *dev,
 	config->num_connector++;
 	spin_unlock_irq(&config->connector_list_lock);
 
-	if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL &&
-	    connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
+	if (connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
 		drm_object_attach_property(&connector->base,
 					      config->edid_property,
 					      0);