mgag200: Wrong looking code in mga_probe_vram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

While reading the mgag200 driver I noticed something that looks wrong.

In mgag200_main.c mga_probe_vram function:

    orig1 = ioread8(mem + offset);
    orig2 = ioread8(mem + offset + 0x100);

    ...

    iowrite16(orig1, mem + offset);
    iowrite16(orig2, mem + offset + 0x100);

I do not understand how exactly the probing works, but ioread8 followed by 
iowrite16 does not look correct.

The corresponding function in xf86-video-mga UMS driver is MGACountRam. It 
does the equivalent of read 16, write 16. So in case you can confirm that the 
kernel driver is correct, it would probably mean the user space driver is 
wrong.

Thanks,
Michal Srb
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux