Bug 95146 - No mouse cursor (invisible) with DVI cable
Summary: No mouse cursor (invisible) with DVI cable
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/openchrome (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Openchrome development list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-26 09:34 UTC by caozong
Modified: 2019-09-18 20:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log with missing cursor (36.15 KB, text/plain)
2016-04-26 09:34 UTC, caozong
no flags Details
tooltips appear but no cursor icon (83.75 KB, image/jpeg)
2016-04-26 09:43 UTC, caozong
no flags Details
value of register (6.90 KB, image/jpeg)
2016-05-19 10:14 UTC, caozong
no flags Details

Description caozong 2016-04-26 09:34:31 UTC
Created attachment 123270 [details]
Xorg.0.log with missing cursor

Setup: Wyse V90LE http://www.parkytowers.me.uk/thin/wyse/vx0/WyseV90LE.shtml 
Chipset: CN700
System: Ubuntu 12.04
Kernel: linux 3.19 drm-openchrome 
DDX: xf86-video-openchrome release 0.4.0
Monitor:LEN E2323swA (DVI-D)

Similar to Bug 94259 (https://bugs.freedesktop.org/show_bug.cgi?id=94259)
After X starts monitor shows a display, but there is no visible mouse cursor. I check the Xorg.0.log and lsmod, and KMS is supported.
Comment 1 caozong 2016-04-26 09:43:09 UTC
Created attachment 123271 [details]
tooltips appear but no cursor icon
Comment 2 caozong 2016-05-19 10:13:29 UTC
I have some updates.

First,I have 4 kinds of environments: 
    vx900 KMS, vx900 UMS, cn700 KMS(bug), cn700 UMS. 
And I tried to print all values of cursor-related registers 
    (PRIM_HI_FBOFFSET, PRIM_HI_CTRL, HI_FBOFFSET, HI_CONTROL). 
I found that the cn700 platform use HI_FBOFFSET and HI_CONTROL which are for second display to show cursor. And the others' value is 0. (the result is in the attachment)

Then I check the code in drm-openchrome/driver/gpu/drm/via/via_crtc.c
        /* Program the offset and turn on Hardware icon Cursor */
	if (iga->index) {
		VIA_WRITE(HI_FBOFFSET, iga->cursor_kmap.bo->offset);
		VIA_WRITE(HI_CONTROL, 0xB6000005);
	}else {
		VIA_WRITE(PRIM_HI_FBOFFSET, iga->cursor_kmap.bo->offset);
		VIA_WRITE(PRIM_HI_CTRL, 0x36000005);
	}
On cn700, it's "else" that always takes place. The register for second display is never set.

So I simply change the condition into true. HI_FBOFFSET and HI_CONTROL are set correctly, but cursor is still not showing.
Comment 3 caozong 2016-05-19 10:14:26 UTC
Created attachment 123906 [details]
value of register
Comment 4 Kevin Brace 2016-07-01 05:49:10 UTC
Hi Zong,

I tried to fix the bug with Eric Kudzin the other day, but apparently the fix does not work.

https://bugs.freedesktop.org/show_bug.cgi?id=94259#c45

Please note that the patch will likely not work.
It appears that CN700's video display engine and later model's (i.e., P4M890 and later) video display engine are different, hence, the code only works as long as the user is using VGA only, and VGA is coming from IGA1 (display controller #1).
It appears that VIA updated the video display engine around P4M890 to CME from the older CLE engine.
Based on how the patch did not work, I think CN700 contains the older CLE engine.
    When James Simmons worked on the new DRM module supporting KMS, he probably simply copied the code from OpenChrome UMS code to the KMS portion of the new DRM module.
He probably did not know that the cursor will not work in CN700 when using IGA2 (i.e., DVI from VT1632A).
When I tested the fix with Eric using his Wyse Vx0 thin client, one monitor can display the cursor (technically, hardware icon or HI), but the other one cannot.
I managed to get DVI working in Vx0 by tinkering with 3X5.96 via (no pun intended) via_regs_dump tool.
It now appears that Wyse Vx0's DVI chip (VT1632A) is connected to DVP0 (Digital Video Port 0).
The register to control this is located at 3X5.96.
I will call this register Digital Video Port 0 Function Select 0.
The bit fields appear to be identical to 3X5.9B (Digital Video Port 1 Function Select 0).
Please note that none of the OGPM (Open Graphics Programming Manual) documents VIA Technologies released mentions DVP0 since DVP0 was discontinued starting with CX700 chipset.
3X5.96 is reserved starting with CX700 chipset.
In order to get IGA2 to be the source of DVP0, set bit 4 to 1.
Keep all the other fields intact.
We managed to get DVI working this way, and I may be able to put the DVP0 related fix in the Version 0.5.
As for the cursor issue, software cursor may have to be turned on all the time for CN700 and older chipsets since HI does not seem to work when IGA1 and IGA2 are running simultaneously (i.e., VGA + DVI RandR situation).
Comment 5 Kevin Brace 2016-07-01 05:50:55 UTC
Hi Zong,

Here is a list OpenChrome developers compiled some while ago.

https://www.freedesktop.org/wiki/Openchrome/HardwareCheatSheet/

I personally doubt CN700 has CME engine though based on the hardware icon not working correctly.
Comment 6 GitLab Migration User 2019-09-18 20:49:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/openchrome/old-bug-database/issues/19.


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.