diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2018-06-03 16:41:00 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-07-31 08:11:12 +1000 |
commit | 91ba11fb7d7ca0a3bbe8a512e65e666e2ec1e889 (patch) | |
tree | 65aca2b7e173c4cdc0658b2feb826b07277f8f50 /drivers/gpu/drm/udl/udl_drv.h | |
parent | 09a00abe3a9941c2715ca83eb88172cd2f54d8fd (diff) | |
download | lwn-91ba11fb7d7ca0a3bbe8a512e65e666e2ec1e889.tar.gz lwn-91ba11fb7d7ca0a3bbe8a512e65e666e2ec1e889.zip |
udl-kms: avoid division
Division is slow, so it shouldn't be done by the pixel generating code.
The driver supports only 2 or 4 bytes per pixel, so we can replace
division with a shift.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/udl/udl_drv.h')
-rw-r--r-- | drivers/gpu/drm/udl/udl_drv.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index 55c0cc309198..7588a9eb0ee0 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -112,7 +112,7 @@ udl_fb_user_fb_create(struct drm_device *dev, struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd); -int udl_render_hline(struct drm_device *dev, int bpp, struct urb **urb_ptr, +int udl_render_hline(struct drm_device *dev, int log_bpp, struct urb **urb_ptr, const char *front, char **urb_buf_ptr, u32 byte_offset, u32 device_byte_offset, u32 byte_width, int *ident_ptr, int *sent_ptr); |