udl-kms: avoid division
authorMikulas Patocka <mpatocka@redhat.com>
Sun, 3 Jun 2018 14:41:00 +0000 (16:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:26:38 +0000 (09:26 +0200)
commitf337a54878e2c0d662ee7bd04b6daabfdaad176f
tree7968bb024d1a036dd981e19e8d06e65edd45616c
parentc0357c1895aedbcbbd9a2eefbff9504f904161f7
udl-kms: avoid division

commit 91ba11fb7d7ca0a3bbe8a512e65e666e2ec1e889 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/udl/udl_drv.h
drivers/gpu/drm/udl/udl_fb.c
drivers/gpu/drm/udl/udl_transfer.c