klogg / fl2000_drm

Linux kernel FL2000DX/IT66121FN dongle DRM driver
GNU General Public License v2.0
113 stars 30 forks source link

Put it to compile under 5.10 kernel version #38

Closed raitech closed 3 years ago

raitech commented 3 years ago

All the alterations cited here happened between 5.8 and 5.10 kernel versions.

drm_dev_init() is not a "public" function anymore, so drm_dev_alloc() or devm_drm_dev_alloc() must be used instead. And they use a different form of initialization, so a lot of things have moved around or had just been cutted off.

Why devm_drm_dev_alloc()? It was the most popular in drivers/gpu/drm drivers.

drm_gem_object_put() is the replacement to the _unlocked() sufixed option. The latter took care of locks, and that, as far as I understood, is not need anymore.

drm_prime_pages_to_sg() changed it's signature. Now it needs a pointer to the device struct as it's first argument. Luckly, the drm_gem_object struct carries a pointer to it ;)

klogg commented 3 years ago

Hi Raimundo First of all thanks for taking care of cooking a patch. I'm going to push a new version of the driver with dropped I2C detection hack and fixed rmmod / device remove. Would be nice if you rebase and add backwards compatibility with older kernels - some folks here are still on 5.4 Cheers

klogg commented 3 years ago

Nevermind, I've made it myself, see 771ae54 Thanks for the hints anyway!