drm/mipi-dbi: Fix blanking for non-16 bit formats
authorRussell Cloran <rcloran@gmail.com>
Tue, 15 Apr 2025 05:32:59 +0000 (22:32 -0700)
committerMaxime Ripard <mripard@kernel.org>
Tue, 29 Apr 2025 15:29:49 +0000 (17:29 +0200)
commit1a8bc0fe8039e1e57f68c4a588f0403d98bfeb1f
treef488cf6ebd4658ecd4581107bb4b4ecd50d90691
parent48ccf21fa8dc595c8aa4f1d347b593dcae0727d0
drm/mipi-dbi: Fix blanking for non-16 bit formats

On r6x2b6x2g6x2 displays not enough blank data is sent to blank the
entire screen. When support for these displays was added, the dirty
function was updated to handle the different amount of data, but
blanking was not, and remained hardcoded as 2 bytes per pixel.

This change applies almost the same algorithm used in the dirty function
to the blank function, but there is no fb available at that point, and
no concern about having to transform any data, so the dbidev pixel
format is always used for calculating the length.

Fixes: 4aebb79021f3 ("drm/mipi-dbi: Add support for DRM_FORMAT_RGB888")
Signed-off-by: Russell Cloran <rcloran@gmail.com>
Link: https://lore.kernel.org/r/20250415053259.79572-1-rcloran@gmail.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/drm_mipi_dbi.c