[Bug 17902] [830M missing dvo driver] need support for DVO-LVDS via na2501
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jun 6 18:21:06 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=17902
--- Comment #83 from thor at math.tu-berlin.de 2012-06-06 18:21:06 PDT ---
Finally, success!
I'm not quite sure why, but for reasons unclear to me the DVO chip only wants
to talk if the PLL is enabled and running and the screen resolution fits. In
addition, the system has apparently a "fake" VGA output that must be disabled
to have the system working properly. Otherwise, the KMS layer seems to want to
redirect the output to the VGA, and then drops dead, leaving an unusable screen
(and DVO!) behind. I do not know yet whether the physical VGA connector works,
but basically, here is the receipt:
1) Apply the patches I mentioned above. Especially, the bypass mode of the
scaler must be set as its function is unclear.
static void ns2501_dpms(struct intel_dvo_device *dvo, int mode)
{
struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
unsigned char ch;
DRM_DEBUG_KMS("%s: Trying set the dpms of the DVO to
%d\n",__FUNCTION__,mode);
if (ns->reg_8_set) {
ch = ns->reg_8_shadow;
} else {
ch = NS2501_8_PD | NS2501_8_BPAS | NS2501_8_VEN | NS2501_8_HEN;
}
if (mode == DRM_MODE_DPMS_ON)
ch |= NS2501_8_PD;
else
ch &= ~NS2501_8_PD;
ch |= NS2501_8_BPAS;
if (ns->reg_8_set == 0 || ns->reg_8_shadow != ch) {
ns->reg_8_set = 1;
ns->reg_8_shadow = ch;
ns2501_writeb(dvo, NS2501_REG8, ch);
}
}
Here I added a shadow register which is likely not exactly necessary, though I
wanted to avoid the i2c communication if not necessary.
2) There is still a bug in the ns2501 source in so far as the query function
returns something unitialized if reading from the DVO fails. And it fails quite
often.
static enum drm_connector_status ns2501_detect(struct intel_dvo_device *dvo)
{
uint8_t reg9;
enum drm_connector_status status = connector_status_unknown;
struct ns2501_priv *ns = (struct ns2501_priv *)(dvo->dev_priv);
DRM_DEBUG_KMS("%s: Trying to detect the connector status\n",__FUNCTION__);
if (ns2501_readb(dvo, NS2501_REG9, ®9)) {
if (!(reg9 & NS2501_9_RSEN))
status = connector_status_connected;
else
status = connector_status_disconnected;
ns->reg_9_set = 1;
ns->reg_9_shadow = reg9;
} else if (ns->reg_9_set) {
if (!(ns->reg_9_shadow & NS2501_9_RSEN))
status = connector_status_connected;
else
status = connector_status_disconnected;
}
DRM_DEBUG_KMS("%s: Status is %d\n",__FUNCTION__,status);
return status;
}
Again a shadow register was added.
3) The following kernel arguments should be added to disable the VGA output:
i915.modeset=1 video=VGA-1:1024x768d video=DVI-I-1:1024x768e
I'm not sure why the system behaives so strange otherwise, I'll try to dig a
bit deeper, but I believe that there is some limitation with the i830 and its
outputs. Probably I'll find a datasheet.
With the above modifications, you cannot, of course, scale the screen
(resolution is fixed), though 3D acceleration works nicely.
The same trick might also apply to the IBM R31, I'll check later next week - it
had similar issues.
(Is actually anyone reading this??? Is there a better way to supply patches?)
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the dri-devel
mailing list