diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-05-22 18:23:33 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-06-16 18:57:28 +0300 |
commit | e0ae5251cd030b201c14f5888a539aa40f17abfb (patch) | |
tree | 85bb4f889bdb1c041d29c802366c386c7b2e512c | |
parent | 0f153de858032c95ea5844aa6e0f1c8dad7531da (diff) |
vgaarb: read back vga count when setting new decoding
Decode kernel operation can also change vga refcount, so we need to read back
the information when calling it.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | src/common_vgaarb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c index f09d513..c94b362 100644 --- a/src/common_vgaarb.c +++ b/src/common_vgaarb.c @@ -263,6 +263,13 @@ pci_device_vgaarb_decodes(int new_vgaarb_rsrc) ret = vgaarb_write(pci_sys->vgaarb_fd, buf, len); if (ret == 0) dev->vgaarb_rsrc = new_vgaarb_rsrc; + + ret = read(pci_sys->vgaarb_fd, buf, BUFSIZE); + if (ret <= 0) + return -1; + + parse_string_to_decodes_rsrc(buf, &pci_sys->vga_count, NULL); + return ret; } |