summaryrefslogtreecommitdiff
path: root/libxvmc/viaLowLevelPro.c
diff options
context:
space:
mode:
authorThomas Hellström <thomas@shipmail.org>2006-09-24 16:09:10 +0000
committerThomas Hellström <thomas@shipmail.org>2006-09-24 16:09:10 +0000
commit542024fb01e587b84fe4e8218788ebc755ae36d7 (patch)
treef77e073f6bf505bc292eb5b1d100c3fd746f3555 /libxvmc/viaLowLevelPro.c
parentf64bf47d33e256d8a7b9a0dc51bcfb331fcdc334 (diff)
Fix a mutex unlocking issue (Luc Verhaegen).
Have the lowlevel drivers check for the correct chipid.
Diffstat (limited to 'libxvmc/viaLowLevelPro.c')
-rw-r--r--libxvmc/viaLowLevelPro.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libxvmc/viaLowLevelPro.c b/libxvmc/viaLowLevelPro.c
index 760ae92..5fe3ab5 100644
--- a/libxvmc/viaLowLevelPro.c
+++ b/libxvmc/viaLowLevelPro.c
@@ -1514,8 +1514,15 @@ initXvMCLowLevel(int fd, drm_context_t * ctx,
drmAddress fbAddress, unsigned fbStride, unsigned fbDepth,
unsigned width, unsigned height, int useAgp, unsigned chipId)
{
- XvMCLowLevel *xl = (XvMCLowLevel *) malloc(sizeof(XvMCLowLevel));
+ XvMCLowLevel *xl;
+
+ if (chipId != PCI_CHIP_VT3259) {
+ fprintf(stderr, "You are using an XvMC driver for the wrong chip.\n");
+ fprintf(stderr, "Chipid is 0x%04x.\n", chipId);
+ return NULL;
+ }
+ xl = (XvMCLowLevel *) malloc(sizeof(XvMCLowLevel));
if (!xl)
return NULL;
xl->state = ll_init;