All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gma500: Make VGA and HDMI connector hotpluggable
@ 2013-03-31 11:38 Kero
  2013-04-02 12:54 ` Patrik Jakobsson
  0 siblings, 1 reply; 7+ messages in thread
From: Kero @ 2013-03-31 11:38 UTC (permalink / raw)
  To: David Airlie; +Cc: dri-devel, linux-kernel

From: Kero van Gelder <kero@chello.nl>

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 <kero@chello.nl>
---
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,

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

* Re: [PATCH] gma500: Make VGA and HDMI connector hotpluggable
  2013-03-31 11:38 [PATCH] gma500: Make VGA and HDMI connector hotpluggable Kero
@ 2013-04-02 12:54 ` Patrik Jakobsson
  2013-04-03 15:21   ` gma500: Other things that I could work on Kero
  0 siblings, 1 reply; 7+ messages in thread
From: Patrik Jakobsson @ 2013-04-02 12:54 UTC (permalink / raw)
  To: Kero; +Cc: David Airlie, dri-devel, linux-kernel

On Sun, Mar 31, 2013 at 1:38 PM, Kero <kero@chello.nl> wrote:
> From: Kero van Gelder <kero@chello.nl>
>
> 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 <kero@chello.nl>
> ---
> 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

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

* gma500: Other things that I could work on
  2013-04-02 12:54 ` Patrik Jakobsson
@ 2013-04-03 15:21   ` Kero
  2013-04-03 17:28     ` Patrik Jakobsson
  2013-04-07 19:24     ` Patrik Jakobsson
  0 siblings, 2 replies; 7+ messages in thread
From: Kero @ 2013-04-03 15:21 UTC (permalink / raw)
  To: Patrik Jakobsson; +Cc: dri-devel

Hi,

I would not mind improving use of my Asus EeePC X101CH with Cedar View / gma3600
a bit more. But a barrier is knowledge of the hardware. Meddling with existing (initialization)
code is possible, but for point 1 and 3 below that is not going to cut, it, I expect.

Does anyone have pointers? Who should I talk to about specifications?
I know Intel is not forthcoming with documentation, yet several people have
made contributions for poulsbo and later versions of the hardware.
How did you get the required knowledge?

Things I might, in order of personal preference, in due time (after holiday), take a look at:
1) would be nice to have the full 1024x600 on the external VGA and HDMI
   I had a chance to try another monitor over HDMI, same result: only 800x600 visible.
2) booting with either VGA or HDMI plugged in, yields two black screens: both the laptop
   and the monitor. Un- + re-plugging has no visible effect.
3) the Fn keys for the backlight induce a response in the backlight, but only with
   tiny results; /sys/class/backlight/psb-bl/brightness works fine, though
4) when using modules, initialization from hibernation is not good enough:
   my screen stays black; without using modules, the kernel boots normally, and everything is fine.
5) initialization from suspend is not good enough: my Asus stays in
   some text mode (80x25?), but shows garbage (possibly data from the desired console or
   graphics mode, since sometimes there are reactions correlated to actions)
   Switching tty or using `chvt` do not improve anything.
   NB: hibernating and booting solves this.

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

Thanks!

> We might also consider polling if this causes problems for people, but for now
> this is fine.

Agreed;
The Display Port was already hotpluggable; the Asus has no such connector,
but is not bothered by polling (status is and remains 'disconnected').
That makes me hopeful that hardware without VGA or HDMI connectors will not be
negatively affected. But given the 5 points above, there's no guarantee.

> No biggie, but your tabs where converted to spaces so I recommend
> running checkpatch.pl before submitting.

woops, my mistake. will run checkpatch.pl next time.

Bye,
Kero.

-- 
Are you master of your time here?
Are you master of your own fate?
                   -- Deep Inside -- Exile -- To-Mera

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

* Re: gma500: Other things that I could work on
  2013-04-03 15:21   ` gma500: Other things that I could work on Kero
@ 2013-04-03 17:28     ` Patrik Jakobsson
  2013-04-07 19:24     ` Patrik Jakobsson
  1 sibling, 0 replies; 7+ messages in thread
From: Patrik Jakobsson @ 2013-04-03 17:28 UTC (permalink / raw)
  To: Kero; +Cc: dri-devel

On Wed, Apr 3, 2013 at 5:21 PM, Kero <kero@chello.nl> wrote:
> Hi,
>
> I would not mind improving use of my Asus EeePC X101CH with Cedar View / gma3600
> a bit more. But a barrier is knowledge of the hardware. Meddling with existing (initialization)
> code is possible, but for point 1 and 3 below that is not going to cut, it, I expect.

It would be very useful if you could help out with cedarview. Even if it's just
by testing patches. A big problem for me is that I don't have the hardware so
it's easy to break things without even knowing about it.

>
> Does anyone have pointers? Who should I talk to about specifications?
> I know Intel is not forthcoming with documentation, yet several people have
> made contributions for poulsbo and later versions of the hardware.
> How did you get the required knowledge?

Most of the mode setting stuff are variations of Intel hardware. You can find
specifications at https://01.org/linuxgraphics/ and it's also useful to look at
the Intel i915 drm driver for reference. It is quite a mix so you need to look
at bits and pieces from several of the Intel generations and try to match them
together.

For the non-Intel parts there are some drivers that never made it into mainline
but is still available online. Some parts are open and some are closed.

There is also a fair amount of guessing and probing needed.

>
> Things I might, in order of personal preference, in due time (after holiday), take a look at:
> 1) would be nice to have the full 1024x600 on the external VGA and HDMI
>    I had a chance to try another monitor over HDMI, same result: only 800x600 visible.
> 2) booting with either VGA or HDMI plugged in, yields two black screens: both the laptop
>    and the monitor. Un- + re-plugging has no visible effect.
> 3) the Fn keys for the backlight induce a response in the backlight, but only with
>    tiny results; /sys/class/backlight/psb-bl/brightness works fine, though
> 4) when using modules, initialization from hibernation is not good enough:
>    my screen stays black; without using modules, the kernel boots normally, and everything is fine.
> 5) initialization from suspend is not good enough: my Asus stays in
>    some text mode (80x25?), but shows garbage (possibly data from the desired console or
>    graphics mode, since sometimes there are reactions correlated to actions)
>    Switching tty or using `chvt` do not improve anything.
>    NB: hibernating and booting solves this.

There are quite a few issues that needs to be addressed and code that needs to
be refactored. I suggest you just dig in and get your hands dirty.

-Patrik

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

* Re: gma500: Other things that I could work on
  2013-04-03 15:21   ` gma500: Other things that I could work on Kero
  2013-04-03 17:28     ` Patrik Jakobsson
@ 2013-04-07 19:24     ` Patrik Jakobsson
  2013-04-17 17:57       ` Kero
  1 sibling, 1 reply; 7+ messages in thread
From: Patrik Jakobsson @ 2013-04-07 19:24 UTC (permalink / raw)
  To: Kero; +Cc: dri-devel

Hi Kero

> 4) when using modules, initialization from hibernation is not good enough:
>    my screen stays black; without using modules, the kernel boots normally, and everything is fine.
> 5) initialization from suspend is not good enough: my Asus stays in
>    some text mode (80x25?), but shows garbage (possibly data from the desired console or
>    graphics mode, since sometimes there are reactions correlated to actions)
>    Switching tty or using `chvt` do not improve anything.
>    NB: hibernating and booting solves this.

I may have fixed some of your issues, could you please try the latest
gma500-next and report back.

https://github.com/patjak/drm-gma500.git gma500-next

Thanks
Patrik

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

* Re: gma500: Other things that I could work on
  2013-04-07 19:24     ` Patrik Jakobsson
@ 2013-04-17 17:57       ` Kero
  2013-04-17 22:19         ` Patrik Jakobsson
  0 siblings, 1 reply; 7+ messages in thread
From: Kero @ 2013-04-17 17:57 UTC (permalink / raw)
  To: Patrik Jakobsson; +Cc: dri-devel

> > 4) when using modules, initialization from hibernation is not good enough:
> >    my screen stays black; without using modules, the kernel boots normally, and everything is fine.
> > 5) initialization from suspend is not good enough: my Asus stays in
> >    some text mode (80x25?), but shows garbage (possibly data from the desired console or
> >    graphics mode, since sometimes there are reactions correlated to actions)
> >    Switching tty or using `chvt` do not improve anything.
> >    NB: hibernating and booting solves this.
> 
> I may have fixed some of your issues, could you please try the latest
> gma500-next and report back.
> 
> https://github.com/patjak/drm-gma500.git gma500-next

Like I said, I am on vacation.
So it took a while before I had some time to spend on this experiment.
The good news, both problems seem to be solved on my hardware.

Bye,
Kero.

-- 
Are you master of your time here?
Are you master of your own fate?
                   -- Deep Inside -- Exile -- To-Mera

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

* Re: gma500: Other things that I could work on
  2013-04-17 17:57       ` Kero
@ 2013-04-17 22:19         ` Patrik Jakobsson
  0 siblings, 0 replies; 7+ messages in thread
From: Patrik Jakobsson @ 2013-04-17 22:19 UTC (permalink / raw)
  To: Kero; +Cc: dri-devel

On Wed, Apr 17, 2013 at 7:57 PM, Kero <kero@chello.nl> wrote:
>> > 4) when using modules, initialization from hibernation is not good enough:
>> >    my screen stays black; without using modules, the kernel boots normally, and everything is fine.
>> > 5) initialization from suspend is not good enough: my Asus stays in
>> >    some text mode (80x25?), but shows garbage (possibly data from the desired console or
>> >    graphics mode, since sometimes there are reactions correlated to actions)
>> >    Switching tty or using `chvt` do not improve anything.
>> >    NB: hibernating and booting solves this.
>>
>> I may have fixed some of your issues, could you please try the latest
>> gma500-next and report back.
>>
>> https://github.com/patjak/drm-gma500.git gma500-next
>
> Like I said, I am on vacation.
> So it took a while before I had some time to spend on this experiment.
> The good news, both problems seem to be solved on my hardware.

Vacation is vacation... you're excused ;)

Thanks for testing, seems the biggest bumps for cdv suspend/hibernation are
gone. Feel free to look at the other issues if you have some spare time on your
hands.

-Patrik

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

end of thread, other threads:[~2013-04-17 22:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-31 11:38 [PATCH] gma500: Make VGA and HDMI connector hotpluggable Kero
2013-04-02 12:54 ` Patrik Jakobsson
2013-04-03 15:21   ` gma500: Other things that I could work on Kero
2013-04-03 17:28     ` Patrik Jakobsson
2013-04-07 19:24     ` Patrik Jakobsson
2013-04-17 17:57       ` Kero
2013-04-17 22:19         ` Patrik Jakobsson

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.