All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org,
	kraxel@redhat.com, emil.velikov@collabora.com,
	noralf@tronnes.org, zboszor@pr.hu
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 2/7] drm/udl: Don't track number of identical and sent pixels per line
Date: Wed,  4 Dec 2019 14:24:25 +0100	[thread overview]
Message-ID: <20191204132430.16874-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20191204132430.16874-1-tzimmermann@suse.de>

A call to udl_render_hline() returns the number of identical and
sent pixels. None of these values is used. Remove the parameters.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/udl/udl_drv.h      | 3 +--
 drivers/gpu/drm/udl/udl_fb.c       | 6 +-----
 drivers/gpu/drm/udl/udl_transfer.c | 4 +---
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h
index 42426407c318..d732c9e47812 100644
--- a/drivers/gpu/drm/udl/udl_drv.h
+++ b/drivers/gpu/drm/udl/udl_drv.h
@@ -93,8 +93,7 @@ udl_fb_user_fb_create(struct drm_device *dev,
 
 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);
+		     u32 byte_offset, u32 device_byte_offset, u32 byte_width);
 
 struct drm_gem_object *udl_driver_gem_create_object(struct drm_device *dev,
 						    size_t size);
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index bc033779f6e4..ed6d9476b25b 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -68,8 +68,6 @@ int udl_handle_damage(struct drm_framebuffer *fb, int x, int y,
 	struct udl_device *udl = to_udl(dev);
 	int i, ret;
 	char *cmd;
-	int bytes_sent = 0;
-	int bytes_identical = 0;
 	struct urb *urb;
 	int aligned_x;
 	int log_bpp;
@@ -115,8 +113,7 @@ int udl_handle_damage(struct drm_framebuffer *fb, int x, int y,
 		const int dev_byte_offset = (fb->width * i + x) << log_bpp;
 		if (udl_render_hline(dev, log_bpp, &urb, (char *)vaddr,
 				     &cmd, byte_offset, dev_byte_offset,
-				     width << log_bpp,
-				     &bytes_identical, &bytes_sent))
+				     width << log_bpp))
 			goto out;
 	}
 
@@ -127,7 +124,6 @@ int udl_handle_damage(struct drm_framebuffer *fb, int x, int y,
 			*cmd++ = 0xAF;
 		len = cmd - (char *) urb->transfer_buffer;
 		ret = udl_submit_urb(dev, urb, len);
-		bytes_sent += len;
 	} else
 		udl_urb_completion(urb);
 
diff --git a/drivers/gpu/drm/udl/udl_transfer.c b/drivers/gpu/drm/udl/udl_transfer.c
index 1973a4c1e358..686358d1f669 100644
--- a/drivers/gpu/drm/udl/udl_transfer.c
+++ b/drivers/gpu/drm/udl/udl_transfer.c
@@ -212,8 +212,7 @@ static void udl_compress_hline16(
 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)
+		     u32 byte_width)
 {
 	const u8 *line_start, *line_end, *next_pixel;
 	u32 base16 = 0 + (device_byte_offset >> log_bpp) * 2;
@@ -237,7 +236,6 @@ int udl_render_hline(struct drm_device *dev, int log_bpp, struct urb **urb_ptr,
 			int len = cmd - (u8 *) urb->transfer_buffer;
 			if (udl_submit_urb(dev, urb, len))
 				return 1; /* lost pixels is set */
-			*sent_ptr += len;
 			urb = udl_get_urb(dev);
 			if (!urb)
 				return 1; /* lost_pixels is set */
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-12-04 13:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 13:24 [PATCH 0/7] drm/udl: Prepare damage handler for simple-pipe KMS Thomas Zimmermann
2019-12-04 13:24 ` [PATCH 1/7] drm/udl: Remove unused statistics counters Thomas Zimmermann
2019-12-04 13:24 ` Thomas Zimmermann [this message]
2019-12-04 13:24 ` [PATCH 3/7] drm/udl: Vmap framebuffer after all tests succeeded in damage handling Thomas Zimmermann
2019-12-04 14:25   ` Sam Ravnborg
2019-12-04 15:54     ` Thomas Zimmermann
2019-12-04 13:24 ` [PATCH 4/7] drm/udl: Move clip-rectangle code out of udl_handle_damage() Thomas Zimmermann
2019-12-04 13:24 ` [PATCH 5/7] drm/udl: Move log-cpp code out of udl_damage_handler() Thomas Zimmermann
2019-12-04 13:24 ` [PATCH 6/7] drm/udl: Begin/end access to imported buffers in damage-handler Thomas Zimmermann
2019-12-05 13:25   ` Emil Velikov
2019-12-04 13:24 ` [PATCH 7/7] drm/udl: Remove field lost_pixels from struct udl_device Thomas Zimmermann
2019-12-05  8:15 ` [PATCH 0/7] drm/udl: Prepare damage handler for simple-pipe KMS Gerd Hoffmann
2019-12-05 13:31 ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204132430.16874-3-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=kraxel@redhat.com \
    --cc=noralf@tronnes.org \
    --cc=sam@ravnborg.org \
    --cc=zboszor@pr.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.