CHROMIUM: drm/udl: optimize udl_compress_hline16

The run-length encoding algorithm should compare 16-bit encoded pixel
values instead of using memcmp over raw pixel values. It allows pixels
with similar but different colors to be encoded as repeat pixels, and
thus potentially save USB bandwidth. It also saves some CPU cycles
that were previously spent on frequent memcmp calls.

Signed-off-by: Haixia Shi <hshi@chromium.org>
BUG=chromium:452359
TEST=run null_platform_test on 1920x1080 displaylink

Change-Id: I312c6f9a781283565d1a1a40a1182959a0c285bf
Reviewed-on: https://chromium-review.googlesource.com/243452
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Haixia Shi <hshi@chromium.org>
Trybot-Ready: Haixia Shi <hshi@chromium.org>
Tested-by: Haixia Shi <hshi@chromium.org>
(cherry picked from commit dd6561c41232ef13735dd8c1508356704a303ad5)
Reviewed-on: https://chromium-review.googlesource.com/245413
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
1 file changed