dbason / crystalhd

Broadcom Crystal HD Hardware Decoder (BCM70012/70015) driver on Ubuntu
39 stars 11 forks source link

Linux 4.9+ compatibility #14

Closed philipl closed 7 years ago

philipl commented 7 years ago

I'm not convinced that get_user_pages_remote is the right thing to use, and get_user_pages() is usable in 4.9+.

Note that the 'rw == READ' thing is very suspicious. That was the 'write' flag but we check if our mode is READ. In the new API it's a flag so the weirdness is even more obvious.

dbason commented 7 years ago

Unfortunately that code has come direct from Broadcom with no commit messages after they open sourced it. Best guess looking at the code is that READ in this context means it's reading from the device to DMA and hence DMA is getting written to.