2013-03-31 11:54:05

by Kero

[permalink] [raw]
Subject: [PATCH] gma500: Make VGA and HDMI connector hotpluggable

From: Kero van Gelder <[email protected]>

Both VGA and HDMI connectors are available on my Asus EeePC X101CH.
This patch will cause output to be shown on either when plugged in.
For both, it shows the leftmost 800x600, of the 1024x600 on LVDS.

Signed-off-by: Kero van Gelder <[email protected]>
---
diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
index 8c17534..7b8386f 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
@@ -276,6 +276,7 @@ void cdv_intel_crt_init(struct drm_device *dev,
goto failed_connector;

connector = &psb_intel_connector->base;
+ connector->polled = DRM_CONNECTOR_POLL_HPD;
drm_connector_init(dev, connector,
&cdv_intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA);

diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
index e223b50..464153d 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
@@ -319,6 +319,7 @@ void cdv_hdmi_init(struct drm_device *dev,
goto err_priv;

connector = &psb_intel_connector->base;
+ connector->polled = DRM_CONNECTOR_POLL_HPD;
encoder = &psb_intel_encoder->base;
drm_connector_init(dev, connector,
&cdv_hdmi_connector_funcs,


2013-04-02 12:54:16

by Patrik Jakobsson

[permalink] [raw]
Subject: Re: [PATCH] gma500: Make VGA and HDMI connector hotpluggable

On Sun, Mar 31, 2013 at 1:38 PM, Kero <[email protected]> wrote:
> From: Kero van Gelder <[email protected]>
>
> Both VGA and HDMI connectors are available on my Asus EeePC X101CH.
> This patch will cause output to be shown on either when plugged in.
> For both, it shows the leftmost 800x600, of the 1024x600 on LVDS.
>
> Signed-off-by: Kero van Gelder <[email protected]>
> ---
> diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
> index 8c17534..7b8386f 100644
> --- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
> +++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
> @@ -276,6 +276,7 @@ void cdv_intel_crt_init(struct drm_device *dev,
> goto failed_connector;
>
> connector = &psb_intel_connector->base;
> + connector->polled = DRM_CONNECTOR_POLL_HPD;
> drm_connector_init(dev, connector,
> &cdv_intel_crt_connector_funcs, DRM_MODE_CONNECTOR_VGA);
>
> diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
> index e223b50..464153d 100644
> --- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
> +++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
> @@ -319,6 +319,7 @@ void cdv_hdmi_init(struct drm_device *dev,
> goto err_priv;
>
> connector = &psb_intel_connector->base;
> + connector->polled = DRM_CONNECTOR_POLL_HPD;
> encoder = &psb_intel_encoder->base;
> drm_connector_init(dev, connector,
> &cdv_hdmi_connector_funcs,
> --

Your patch has been applied to:
https://github.com/patjak/drm-gma500.git gma500-next

We might also consider polling if this causes problems for people, but for now
this is fine. No biggie, but your tabs where converted to spaces so I recommend
running checkpatch.pl before submitting.

Thanks
Patrik Jakobsson