All of lore.kernel.org
 help / color / mirror / Atom feed
* pre-nv50 KMS
@ 2009-05-23  8:49 Luo Jinghua
       [not found] ` <beb59a440905230149m2edc3f6ak3c61a45820a66c5f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Luo Jinghua @ 2009-05-23  8:49 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hi, all

I'm trying to implement kms for pre-nv50 in last cuples of days. My
current work[1] is based on the code of nv50 kms & ddx. Basicly,  I
just blindly port the code to kernel land :). I think I'm getting very
close to working state, but it still doesn't work.

Current state:
1) vbios parser is synced with ddx
2) i2c works
3)  Something shows on internel LVDS panel and external DVI flat
panel, but the image is distorted. If I connect the monitor with my
latop via the VGA port and resolution is higher then 1028x1024, it
will say no signal. At lower resultion it shows distorted image. My
monitor native resolution is 1920x1080. You get some idea and know
what is going wrong. I did check the mode_state of ddx and kms, the
are almostly the same except the fb_start and cursor_offset are
different as expected.

[1] git://anongit.freedesktop.org/~jinghua/drm modesetting-gem branch
-- 
Luo Jinghua

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

* Re: pre-nv50 KMS
       [not found] ` <beb59a440905230149m2edc3f6ak3c61a45820a66c5f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-05-23  9:10   ` Luo Jinghua
  2009-05-23 16:00   ` Luo Jinghua
  1 sibling, 0 replies; 12+ messages in thread
From: Luo Jinghua @ 2009-05-23  9:10 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sat, May 23, 2009 at 4:49 PM, Luo Jinghua <sunmoon1997@gmail.com> wrote:
> Hi, all
>
> I'm trying to implement kms for pre-nv50 in last cuples of days. My
> current work[1] is based on the code of nv50 kms & ddx. Basicly,  I
> just blindly port the code to kernel land :). I think I'm getting very
> close to working state, but it still doesn't work.
>
> Current state:
> 1) vbios parser is synced with ddx
> 2) i2c works
> 3)  Something shows on internel LVDS panel and external DVI flat
> panel, but the image is distorted. If I connect the monitor with my
> latop via the VGA port and resolution is higher then 1028x1024, it
> will say no signal. At lower resultion it shows distorted image. My
> monitor native resolution is 1920x1080. You get some idea and know
> what is going wrong. I did check the mode_state of ddx and kms, the
> are almostly the same except the fb_start and cursor_offset are
> different as expected.

The VGA test is done with C51(GeForce 6100, 10de:0242) not my laptop.
LVDS & DVI test is done with GeForce Go 7300.


-- 
Luo Jinghua
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: pre-nv50 KMS
       [not found] ` <beb59a440905230149m2edc3f6ak3c61a45820a66c5f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-05-23  9:10   ` Luo Jinghua
@ 2009-05-23 16:00   ` Luo Jinghua
       [not found]     ` <beb59a440905230900x302478aoc3e9377c45d32b78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Luo Jinghua @ 2009-05-23 16:00 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sat, May 23, 2009 at 4:49 PM, Luo Jinghua <sunmoon1997@gmail.com> wrote:
> Hi, all
>
> I'm trying to implement kms for pre-nv50 in last cuples of days. My
> current work[1] is based on the code of nv50 kms & ddx. Basicly,  I
> just blindly port the code to kernel land :). I think I'm getting very
> close to working state, but it still doesn't work.
>
> Current state:
> 1) vbios parser is synced with ddx
> 2) i2c works
> 3)  Something shows on internel LVDS panel and external DVI flat
> panel, but the image is distorted. If I connect the monitor with my
> latop via the VGA port and resolution is higher then 1028x1024, it
> will say no signal. At lower resultion it shows distorted image. My
> monitor native resolution is 1920x1080. You get some idea and know
> what is going wrong. I did check the mode_state of ddx and kms, the
> are almostly the same except the fb_start and cursor_offset are
> different as expected.
>

I get kms working on my C51 & Go 7300 now.

Remain issues:
1)  LVDS' resolution is stuck at 640x480
2) Cursor doesn't work on C51

-- 
Luo Jinghua
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: pre-nv50 KMS
       [not found]     ` <beb59a440905230900x302478aoc3e9377c45d32b78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-05-23 17:11       ` Maarten Maathuis
       [not found]         ` <6d4bc9fc0905231011l28981a5dpea5480636444a7d4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-05-24  9:27       ` Luo Jinghua
  1 sibling, 1 reply; 12+ messages in thread
From: Maarten Maathuis @ 2009-05-23 17:11 UTC (permalink / raw)
  To: Luo Jinghua; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

The C51 has a very strange HW cursor issue, so that is not surprising.

Bug is http://bugs.freedesktop.org/show_bug.cgi?id=15758

Maarten.

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

* Re: pre-nv50 KMS
       [not found]         ` <6d4bc9fc0905231011l28981a5dpea5480636444a7d4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-05-24  9:26           ` Luo Jinghua
  0 siblings, 0 replies; 12+ messages in thread
From: Luo Jinghua @ 2009-05-24  9:26 UTC (permalink / raw)
  To: Maarten Maathuis; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sun, May 24, 2009 at 1:11 AM, Maarten Maathuis <madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> The C51 has a very strange HW cursor issue, so that is not surprising.
>
> Bug is http://bugs.freedesktop.org/show_bug.cgi?id=15758
>

The DDX driver work pretty well here. My C51 is a Geforce 6100 not the
motioned Geforce 6150. It guess it's my fault instead of the hardware.

> Maarten.
>



-- 
Luo Jinghua

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

* Re: pre-nv50 KMS
       [not found]     ` <beb59a440905230900x302478aoc3e9377c45d32b78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-05-23 17:11       ` Maarten Maathuis
@ 2009-05-24  9:27       ` Luo Jinghua
       [not found]         ` <beb59a440905240227u181f817ck33274c4f2a755be3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Luo Jinghua @ 2009-05-24  9:27 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

>
> I get kms working on my C51 & Go 7300 now.
>
> Remain issues:
> 1)  LVDS' resolution is stuck at 640x480
> 2) Cursor doesn't work on C51

The first issue is fixed now. I forget to add panel's native mode to
probed mode list.

-- 
Luo Jinghua
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: pre-nv50 KMS
       [not found]         ` <beb59a440905240227u181f817ck33274c4f2a755be3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-05-24 15:03           ` Maarten Maathuis
       [not found]             ` <6d4bc9fc0905240803m54402ce1r9754a6bafaf36c48-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Maarten Maathuis @ 2009-05-24 15:03 UTC (permalink / raw)
  To: Luo Jinghua; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

It is possible that the DDX is now masking the problem very well, if
only your C51 has this cursor issue then i would really suspect this
kind of bug.

Maarten.

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

* Re: pre-nv50 KMS
       [not found]             ` <6d4bc9fc0905240803m54402ce1r9754a6bafaf36c48-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-05-25  0:01               ` Luo Jinghua
       [not found]                 ` <beb59a440905241701p4d25cf00jb059efdf187c41a7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Luo Jinghua @ 2009-05-25  0:01 UTC (permalink / raw)
  To: Maarten Maathuis; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Sun, May 24, 2009 at 11:03 PM, Maarten Maathuis <madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> It is possible that the DDX is now masking the problem very well, if
> only your C51 has this cursor issue then i would really suspect this
> kind of bug.
>

The issue is fixed now. Ben Skeggs lastest commit[1] fixed the issue
in DDX driver by disabling bios parser and don't run the bios byte
code. I thought I have areadly have the same commit it in my local
tree. Actually, I did have the fix but revert it later. So, my drm
tree should work well on nv40 now. For pre-nv40, I don't have any of
them. I can't test.

[1] http://cgit.freedesktop.org/nouveau/xf86-video-nouveau/commit/?id=2688c97169d8ea579ba09b9db049e31704f96626


-- 
Luo Jinghua

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

* Re: pre-nv50 KMS
       [not found]                 ` <beb59a440905241701p4d25cf00jb059efdf187c41a7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-05-25  0:14                   ` Ben Skeggs
       [not found]                     ` <1243210441.2864.5.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Ben Skeggs @ 2009-05-25  0:14 UTC (permalink / raw)
  To: Luo Jinghua; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Mon, 2009-05-25 at 08:01 +0800, Luo Jinghua wrote:
> On Sun, May 24, 2009 at 11:03 PM, Maarten Maathuis <madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > It is possible that the DDX is now masking the problem very well, if
> > only your C51 has this cursor issue then i would really suspect this
> > kind of bug.
> >
> 
> The issue is fixed now. Ben Skeggs lastest commit[1] fixed the issue
> in DDX driver by disabling bios parser and don't run the bios byte
> code. I thought I have areadly have the same commit it in my local
> tree. Actually, I did have the fix but revert it later. So, my drm
> tree should work well on nv40 now. For pre-nv40, I don't have any of
> them. I can't test.
It'll likely work well everywhere except nv4 if my own pre-nv5x kms code
is any indication.  I've got fixes to TTM for nv4 in my kernel tree I'll
post sometime this week.

Ben.
> 
> [1] http://cgit.freedesktop.org/nouveau/xf86-video-nouveau/commit/?id=2688c97169d8ea579ba09b9db049e31704f96626
> 
> 

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

* Re: pre-nv50 KMS
       [not found]                     ` <1243210441.2864.5.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2009-05-25  2:08                       ` Luo Jinghua
       [not found]                         ` <beb59a440905241908la3eb9b2ma158b402912b288e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Luo Jinghua @ 2009-05-25  2:08 UTC (permalink / raw)
  To: skeggsb-Re5JQEeQqe8AvxtiuMwx3w; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> It'll likely work well everywhere except nv4 if my own pre-nv5x kms code
> is any indication.  I've got fixes to TTM for nv4 in my kernel tree I'll
> post sometime this week.
>

I'll try your tree once you published it. I get another issue, the DDX
driver don't hide the cursor on leaving vt and left the cursor on my
fb console. It may be already fixed in your local tree.


-- 
Luo Jinghua
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

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

* Re: pre-nv50 KMS
       [not found]                         ` <beb59a440905241908la3eb9b2ma158b402912b288e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-05-25  3:01                           ` Ben Skeggs
       [not found]                             ` <1243220467.19524.1.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Ben Skeggs @ 2009-05-25  3:01 UTC (permalink / raw)
  To: Luo Jinghua; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Mon, 2009-05-25 at 10:08 +0800, Luo Jinghua wrote:
> > It'll likely work well everywhere except nv4 if my own pre-nv5x kms code
> > is any indication.  I've got fixes to TTM for nv4 in my kernel tree I'll
> > post sometime this week.
> >
> 
> I'll try your tree once you published it. I get another issue, the DDX
> driver don't hide the cursor on leaving vt and left the cursor on my
> fb console. It may be already fixed in your local tree.
Mmm, the DDX I was using was the same as what's now in git, so it'd be
something on the kernel side.  The cursor was hidden for me when I
dropped back to a console however.

Testing would be good though, I don't have a (working) pre-nv5x laptop
to test LVDS on anymore.  Otherwise, from nv4 right through to nv4x
seems good.

Ben.
> 
> 

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

* Re: pre-nv50 KMS
       [not found]                             ` <1243220467.19524.1.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2009-05-25 13:22                               ` Luo Jinghua
  0 siblings, 0 replies; 12+ messages in thread
From: Luo Jinghua @ 2009-05-25 13:22 UTC (permalink / raw)
  To: skeggsb-Re5JQEeQqe8AvxtiuMwx3w; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

>> I'll try your tree once you published it. I get another issue, the DDX
>> driver don't hide the cursor on leaving vt and left the cursor on my
>> fb console. It may be already fixed in your local tree.
> Mmm, the DDX I was using was the same as what's now in git, so it'd be
> something on the kernel side.  The cursor was hidden for me when I
> dropped back to a console however.
>

I did add some debug prints to drmmode_display.c. On leaving vt,
drmmode_hide_cursor never be called, the cursor isn't hidden.
I think it should be a right fix by adding xf86_hide_cursors into NVLeaveVT.
I have checked the intel driver. They also disable cursors on leaving vt.
I attached a patch which implements this idea.

> Testing would be good though, I don't have a (working) pre-nv5x laptop
> to test LVDS on anymore.  Otherwise, from nv4 right through to nv4x
> seems good.
>

I happen to have a nv40 laptop. I'm happy to test your kms tree on my laptop:).

-- 
Luo Jinghua

[-- Attachment #2: 0001-Hide-cursors-on-leaving-VT.patch --]
[-- Type: application/octet-stream, Size: 771 bytes --]

From 055a8ff31709d8df284aec2065280d499741499b Mon Sep 17 00:00:00 2001
From: Luo Jinghua <sunmoon1997@gmail.com>
Date: Mon, 25 May 2009 20:47:28 +0800
Subject: [PATCH] Hide cursors on leaving VT

Otherwise the X cursor will not be hidden on my fb console. I
have checked intel DDX driver. They also hide cursors on their
LeaveVT handler.

Signed-off-by: Luo Jinghua <sunmoon1997@gmail.com>
---
 src/nv_driver.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 2b3a596..e691f86 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -726,6 +726,8 @@ NVLeaveVT(int scrnIndex, int flags)
 			NVRestore(pScrn);
 		else
 			NV50ReleaseDisplay(pScrn);
+	} else {
+		xf86_hide_cursors (pScrn);
 	}
 }
 
-- 
1.6.3


[-- Attachment #3: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

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

end of thread, other threads:[~2009-05-25 13:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-23  8:49 pre-nv50 KMS Luo Jinghua
     [not found] ` <beb59a440905230149m2edc3f6ak3c61a45820a66c5f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-23  9:10   ` Luo Jinghua
2009-05-23 16:00   ` Luo Jinghua
     [not found]     ` <beb59a440905230900x302478aoc3e9377c45d32b78-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-23 17:11       ` Maarten Maathuis
     [not found]         ` <6d4bc9fc0905231011l28981a5dpea5480636444a7d4-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-24  9:26           ` Luo Jinghua
2009-05-24  9:27       ` Luo Jinghua
     [not found]         ` <beb59a440905240227u181f817ck33274c4f2a755be3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-24 15:03           ` Maarten Maathuis
     [not found]             ` <6d4bc9fc0905240803m54402ce1r9754a6bafaf36c48-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-25  0:01               ` Luo Jinghua
     [not found]                 ` <beb59a440905241701p4d25cf00jb059efdf187c41a7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-25  0:14                   ` Ben Skeggs
     [not found]                     ` <1243210441.2864.5.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-05-25  2:08                       ` Luo Jinghua
     [not found]                         ` <beb59a440905241908la3eb9b2ma158b402912b288e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-25  3:01                           ` Ben Skeggs
     [not found]                             ` <1243220467.19524.1.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-05-25 13:22                               ` Luo Jinghua

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.