Bug 12825 - TvTime shows only the upper left corner (~ 1280x1024) in Randr1.2
Summary: TvTime shows only the upper left corner (~ 1280x1024) in Randr1.2
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14405
  Show dependency treegraph
 
Reported: 2007-10-16 06:58 UTC by David
Modified: 2008-04-29 17:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
log tvtime -v (1.89 KB, text/x-log)
2007-10-16 07:01 UTC, David
no flags Details
log Xorg (398.46 KB, text/x-log)
2007-10-16 07:04 UTC, David
no flags Details
dmesg (18.69 KB, text/plain)
2007-10-16 07:06 UTC, David
no flags Details
xorg.conf (6.78 KB, application/octet-stream)
2007-10-16 07:09 UTC, David
no flags Details
log xorg (119.45 KB, application/octet-stream)
2008-01-19 13:09 UTC, David
no flags Details
xorg log (129.65 KB, text/x-log)
2008-02-03 10:35 UTC, David
no flags Details
A possible fix (1.84 KB, patch)
2008-04-28 09:12 UTC, Stuart Bennett
no flags Details | Splinter Review

Description David 2007-10-16 06:58:57 UTC
At higher resolutions greater than 1280x1024 TvTime only shows the top left, it seems to 1280x1024, the rest is blue. If I see Tvtime in small window in the upper left is well, if I put the window in the lower right corner is all blue.

The gdm starts with a resolution of 1280x1024, with nv boots to the maximum resolution of monitor, 2048x1536.

The screen displayed a line of vertical pixel roses on the right side and a more thin at the bottom.

Tvtime does not show any error.
Comment 1 David 2007-10-16 07:01:26 UTC
Created attachment 12070 [details]
log tvtime -v
Comment 2 David 2007-10-16 07:04:22 UTC
Created attachment 12071 [details]
log Xorg
Comment 3 David 2007-10-16 07:06:12 UTC
Created attachment 12072 [details]
dmesg
Comment 4 David 2007-10-16 07:09:06 UTC
Created attachment 12073 [details]
xorg.conf
Comment 5 Maarten Maathuis 2008-01-17 06:12:19 UTC
Is this still an issue?
Comment 6 David 2008-01-19 13:09:13 UTC
Created attachment 13801 [details]
log xorg
Comment 7 David 2008-01-19 13:11:12 UTC
Tvtime has not changed.
The pink lines has disappeared.
Comment 8 Maarten Maathuis 2008-01-19 13:34:49 UTC
Does this happen with mplayer also?
Comment 9 David 2008-01-19 13:53:08 UTC
This also does happen with mplayer, output xv.
Comment 10 Maarten Maathuis 2008-02-01 11:42:16 UTC
I think something related got fixed, is this still an issue?
Comment 11 David 2008-02-03 10:34:10 UTC
Still the same thing happening with tvtime and mplayer.
Also still booting gdm to 1280x1024 Is this normal?
Comment 12 David 2008-02-03 10:35:08 UTC
Created attachment 14124 [details]
xorg log
Comment 13 Maarten Maathuis 2008-02-03 10:43:40 UTC
It's not the driver's choice what resolution to run, gdm has been known to prefer different resolutions, don't ask me why.

You are able to increase to maximum resolution?
Comment 14 Maarten Maathuis 2008-02-03 10:49:28 UTC
Does the blitter adapter work? (check xvinfo for the adapter number)

Does this also occur without randr12 enabled?
Comment 15 David 2008-02-03 12:04:11 UTC
I can put maximum resolution of 2048x1536 with and without RandR12.

I made the following testing with "mplayer -vo xv:port=XXX"

"NV Video Overlay" without RandR12 OK
"NV Video Blitter" without RandR12 OK
"NV Video Overlay" RandR12 only upper left corner.
"NV Video Blitter" RandR12 OK

Xvinfo with and without RandR12 only change port 105,106 to 134,135.
Comment 16 Stuart Bennett 2008-03-15 13:15:18 UTC
If you remove the TV capture card from the computer does it work?
Comment 17 David 2008-03-16 08:37:31 UTC
I removed the TV card from the computer and continues as before. 
Comment 18 Stuart Bennett 2008-03-16 12:08:05 UTC
I've tracked this down, and found two(ish) fixes.

The problem is that currently the video overlay gets clipped to the screen viewport in xf86XVClipVideoHelper(), the viewport having been determined (as "clipBoxes" in DDX parlance) by xf86XVPutStill in the xserver before calling back into NVPutImage and then NV_set_dimensions where xf86XVClipVideoHelper is called. This would all be fine except that xf86XVPutStill uses pScrn->frameX1 and pScrn->frameY1 which are wrong (they don't map well to the randr12 world-view). I'd argue therefore for this being an xserver issue.

Unfortunately fixes to the xserver take time, so a driver work-around is required:
1a) do something like
pScrn->frameX1 = xf86_config->crtc[pPriv->overlayCRTC]->x + xf86_config->crtc[pPriv->overlayCRTC]->mode.HDisplay - 1;
(and similarly for frameY1) when the overlay CRTC is known, to provide a sensible value for clipping
1b) do something like pScrn->frameX1 = pScrn->virtualX - 1; (and similarly for frameY1)  to provide a sensible (if large) value for clipping
2) remove the flag VIDEO_CLIP_TO_VIEWPORT from nv_video.c to remove the clipping altogether. Depending how the rest of the code works, this could be a bad move due to excessive bandwidth usage and very-very-large frames being larger than the overlay can handle

(an xserver bug ought to be filed once a suitable resolution is found)
Comment 19 Stuart Bennett 2008-04-28 09:12:20 UTC
Created attachment 16218 [details] [review]
A possible fix

This replaces the clipping done in the xserver by doing it in the driver. Obviously, dropping VIDEO_CLIP_TO_VIEWPORT altogether (it's already not used in the blitter or texture adapters) would be even simpler...
Comment 20 David 2008-04-28 10:10:41 UTC
The patch works correctly in my case.

I have other problems that I have to see if they are reported or not yet, but I have noticed that are not caused by this patch.

Thank you.
Comment 21 Stuart Bennett 2008-04-29 17:12:46 UTC
Patch applied


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.