Fallback to default values for devices without vendor firmware descriptor. Enables support for such devices. Since we're at it, improve the descriptor parser.
Patches 1 to 3 do some cleanups for the driver. Patches 4 to 8 rewrite the parser code for the vendor firmware descriptor. It's now more compatible and validates the raw input more reliably. Patch 9 adds support for the additional devices. Tested with various DisplayLink adapters, including one without vendor firmware descriptor. Thomas Zimmermann (9): drm/udl: Remove unused field dev from struct udl_device drm/udl: Remove unused field gem_lock from struct udl_device drm/udl: Improve type safety when using struct udl_device drm/udl: The number of pixels is always positive drm/udl: Handle errors from usb_get_descriptor() drm/udl: Return error if vendor descriptor is too short drm/udl: Treat vendor descriptor as u8 drm/udl: Validate length in vendor-descriptor parser drm/udl: Support adapters without firmware descriptor drivers/gpu/drm/udl/udl_drv.c | 6 +- drivers/gpu/drm/udl/udl_drv.h | 19 ++-- drivers/gpu/drm/udl/udl_main.c | 174 +++++++++++++++++------------ drivers/gpu/drm/udl/udl_modeset.c | 21 ++-- drivers/gpu/drm/udl/udl_transfer.c | 6 +- 5 files changed, 128 insertions(+), 98 deletions(-) -- 2.49.0