diff options
author | kfou <kfou at free.fr> | 2009-08-02 16:58:17 -0700 |
---|---|---|
committer | bernie User <bernie@ubuntu.ubuntu-domain> | 2009-08-02 16:58:17 -0700 |
commit | 8b462793d5137f51c7e30ccc0de3291d8363e6ab (patch) | |
tree | 01bed58af6facb6c6d36c8846e3fd94e31c288a6 | |
parent | d6322da0b2277bb5fa1615832529ead179aa51cf (diff) |
Explicitly set channel before and after modeset. Resolved reported
problems with certain displaylink devices.
Future changes should remove channel related stuff entirely, if
possible.
-rw-r--r-- | src/dlo_mode.c | 7 | ||||
-rw-r--r-- | src/libdlo.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/dlo_mode.c b/src/dlo_mode.c index b341557..c3f5db0 100644 --- a/src/dlo_mode.c +++ b/src/dlo_mode.c @@ -683,16 +683,21 @@ static dlo_retcode_t mode_set_from_edid(dlo_device_t * const dev, edid_detail_un if (base & 1) return dlo_err_bad_mode; + /* Select the standard output channel */ + ERR(dlo_usb_std_chan(dev)); + dev->mode.view.base = base; dev->base8 = base + (BYTES_PER_16BPP * edid->hActive * edid->vActive); ERR(set_base(dev, dev->mode.view.base, dev->base8)); - //ERR(dlo_usb_std_chan(dev)); ERR(edid_to_vreg_commands(dev, edid, 24)); /* Flush the command buffer */ ERR(dlo_usb_write(dev)); + /* Revert channel back ? */ + ERR(dlo_usb_chan_sel(dev, DLO_MODE_POSTAMBLE, DSIZEOF(DLO_MODE_POSTAMBLE))); + /* Update the device with the new mode details */ dev->mode.view.width = edid->hActive; dev->mode.view.height = edid->vActive; diff --git a/src/libdlo.c b/src/libdlo.c index 6e72ef7..0d231c0 100644 --- a/src/libdlo.c +++ b/src/libdlo.c @@ -451,9 +451,6 @@ dlo_dev_t dlo_claim_device(const dlo_dev_t uid, const dlo_claim_t flags, const u /* Any other errors from opening the connection get returned to the caller */ ERR_GOTO(err); - /* Select the standard output channel */ - ERR_GOTO(dlo_usb_std_chan(dev)); - /* Attempt to change mode into the native resolution of the display (if we have one) */ dlo_mode_set_default(dev, 0); |