Re: [PATCH v2 5/7] drm/panic: Convert to drm_fb_clip_offset()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 13/06/2024 21:18, Geert Uytterhoeven wrote:
Use the drm_fb_clip_offset() helper instead of open-coding the same
operation.

Thanks, it's a nice cleanup.

Reviewed-by: Jocelyn Falempe <jfalempe@xxxxxxxxxx>


Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
---
DRM_PANIC already selects DRM_KMS_HELPER.

v2:
   - New.
---
  drivers/gpu/drm/drm_panic.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c
index 814ef5c20c08ee42..5b0acf8c86e402a8 100644
--- a/drivers/gpu/drm/drm_panic.c
+++ b/drivers/gpu/drm/drm_panic.c
@@ -285,7 +285,7 @@ static void drm_panic_blit(struct drm_scanout_buffer *sb, struct drm_rect *clip,
  		return drm_panic_blit_pixel(sb, clip, sbuf8, spitch, fg_color);
map = sb->map[0];
-	iosys_map_incr(&map, clip->y1 * sb->pitch[0] + clip->x1 * sb->format->cpp[0]);
+	iosys_map_incr(&map, drm_fb_clip_offset(sb->pitch[0], sb->format, clip));
switch (sb->format->cpp[0]) {
  	case 2:
@@ -373,7 +373,7 @@ static void drm_panic_fill(struct drm_scanout_buffer *sb, struct drm_rect *clip,
  		return drm_panic_fill_pixel(sb, clip, color);
map = sb->map[0];
-	iosys_map_incr(&map, clip->y1 * sb->pitch[0] + clip->x1 * sb->format->cpp[0]);
+	iosys_map_incr(&map, drm_fb_clip_offset(sb->pitch[0], sb->format, clip));
switch (sb->format->cpp[0]) {
  	case 2:





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux