[PATCH V2 3/5] drm/vkms: Rename vkms_crc_data to vkms_data

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

 



Rename the struct vkms_crc_data to vkms_data and also remove the CRC
prefix from variables that use this struct.

Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@xxxxxxxxx>
---
 drivers/gpu/drm/vkms/vkms_composer.c |  8 +++----
 drivers/gpu/drm/vkms/vkms_composer.h |  8 +++----
 drivers/gpu/drm/vkms/vkms_crc.c      | 14 +++++------
 drivers/gpu/drm/vkms/vkms_drv.h      |  6 ++---
 drivers/gpu/drm/vkms/vkms_plane.c    | 36 ++++++++++++++--------------
 5 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
index 3d7c5e316d6e..c636dc672430 100644
--- a/drivers/gpu/drm/vkms/vkms_composer.c
+++ b/drivers/gpu/drm/vkms/vkms_composer.c
@@ -19,8 +19,8 @@
  * Todo: Use the alpha value to blend vaddr_src with vaddr_dst
  *	 instead of overwriting it.
  */
-void blend(void *vaddr_dst, void *vaddr_src, struct vkms_crc_data *dest,
-	   struct vkms_crc_data *src)
+void blend(void *vaddr_dst, void *vaddr_src, struct vkms_data *dest,
+	   struct vkms_data *src)
 {
 	int i, j, j_dst, i_dst;
 	int offset_src, offset_dst;
@@ -52,8 +52,8 @@ void blend(void *vaddr_dst, void *vaddr_src, struct vkms_crc_data *dest,
 	}
 }
 
-void compose_cursor(struct vkms_crc_data *cursor,
-		    struct vkms_crc_data *primary, void *vaddr_out)
+void compose_cursor(struct vkms_data *cursor, struct vkms_data *primary,
+		    void *vaddr_out)
 {
 	struct drm_gem_object *cursor_obj;
 	struct vkms_gem_object *cursor_vkms_obj;
diff --git a/drivers/gpu/drm/vkms/vkms_composer.h b/drivers/gpu/drm/vkms/vkms_composer.h
index 53fdee17a632..93842b4b2eed 100644
--- a/drivers/gpu/drm/vkms/vkms_composer.h
+++ b/drivers/gpu/drm/vkms/vkms_composer.h
@@ -3,10 +3,10 @@
 #ifndef _VKMS_COMPOSER_H_
 #define _VKMS_COMPOSER_H_
 
-void blend(void *vaddr_dst, void *vaddr_src, struct vkms_crc_data *dest,
-	   struct vkms_crc_data *src);
+void blend(void *vaddr_dst, void *vaddr_src, struct vkms_data *dest,
+	   struct vkms_data *src);
 
-void compose_cursor(struct vkms_crc_data *cursor,
-		    struct vkms_crc_data *primary, void *vaddr_out);
+void compose_cursor(struct vkms_data *cursor, struct vkms_data *primary,
+		    void *vaddr_out);
 
 #endif /* _VKMS_COMPOSER_H_ */
diff --git a/drivers/gpu/drm/vkms/vkms_crc.c b/drivers/gpu/drm/vkms/vkms_crc.c
index 8b215677581f..69d0decf14af 100644
--- a/drivers/gpu/drm/vkms/vkms_crc.c
+++ b/drivers/gpu/drm/vkms/vkms_crc.c
@@ -16,7 +16,7 @@
  * returns CRC value computed using crc32 on the visible portion of
  * the final framebuffer at vaddr_out
  */
-static uint32_t compute_crc(void *vaddr_out, struct vkms_crc_data *crc_out)
+static uint32_t compute_crc(void *vaddr_out, struct vkms_data *crc_out)
 {
 	int i, j, src_offset;
 	int x_src = crc_out->src.x1 >> 16;
@@ -40,8 +40,8 @@ static uint32_t compute_crc(void *vaddr_out, struct vkms_crc_data *crc_out)
 	return crc;
 }
 
-static uint32_t _vkms_get_crc(struct vkms_crc_data *primary_crc,
-			      struct vkms_crc_data *cursor_crc)
+static uint32_t _vkms_get_crc(struct vkms_data *primary_crc,
+			      struct vkms_data *cursor_crc)
 {
 	struct drm_framebuffer *fb = &primary_crc->fb;
 	struct drm_gem_object *gem_obj = drm_gem_fb_get_obj(fb, 0);
@@ -87,8 +87,8 @@ void vkms_crc_work_handle(struct work_struct *work)
 						crc_work);
 	struct drm_crtc *crtc = crtc_state->base.crtc;
 	struct vkms_output *out = drm_crtc_to_vkms_output(crtc);
-	struct vkms_crc_data *primary_crc = NULL;
-	struct vkms_crc_data *cursor_crc = NULL;
+	struct vkms_data *primary_crc = NULL;
+	struct vkms_data *cursor_crc = NULL;
 	u32 crc32 = 0;
 	u64 frame_start, frame_end;
 	bool crc_pending;
@@ -110,10 +110,10 @@ void vkms_crc_work_handle(struct work_struct *work)
 		return;
 
 	if (crtc_state->num_active_planes >= 1)
-		primary_crc = crtc_state->active_planes[0]->crc_data;
+		primary_crc = crtc_state->active_planes[0]->data;
 
 	if (crtc_state->num_active_planes == 2)
-		cursor_crc = crtc_state->active_planes[1]->crc_data;
+		cursor_crc = crtc_state->active_planes[1]->data;
 
 	if (primary_crc)
 		crc32 = _vkms_get_crc(primary_crc, cursor_crc);
diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h
index a887c05ff70e..8d628d18105e 100644
--- a/drivers/gpu/drm/vkms/vkms_drv.h
+++ b/drivers/gpu/drm/vkms/vkms_drv.h
@@ -20,7 +20,7 @@
 
 extern bool enable_cursor;
 
-struct vkms_crc_data {
+struct vkms_data {
 	struct drm_framebuffer fb;
 	struct drm_rect src, dst;
 	unsigned int offset;
@@ -31,11 +31,11 @@ struct vkms_crc_data {
 /**
  * vkms_plane_state - Driver specific plane state
  * @base: base plane state
- * @crc_data: data required for CRC computation
+ * @data: data required for compose computation
  */
 struct vkms_plane_state {
 	struct drm_plane_state base;
-	struct vkms_crc_data *crc_data;
+	struct vkms_data *data;
 };
 
 /**
diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
index 0fceb6258422..8cf40297cf56 100644
--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -18,20 +18,20 @@ static struct drm_plane_state *
 vkms_plane_duplicate_state(struct drm_plane *plane)
 {
 	struct vkms_plane_state *vkms_state;
-	struct vkms_crc_data *crc_data;
+	struct vkms_data *data;
 
 	vkms_state = kzalloc(sizeof(*vkms_state), GFP_KERNEL);
 	if (!vkms_state)
 		return NULL;
 
-	crc_data = kzalloc(sizeof(*crc_data), GFP_KERNEL);
-	if (!crc_data) {
-		DRM_DEBUG_KMS("Couldn't allocate crc_data\n");
+	data = kzalloc(sizeof(*data), GFP_KERNEL);
+	if (!data) {
+		DRM_DEBUG_KMS("Couldn't allocate vkms_data\n");
 		kfree(vkms_state);
 		return NULL;
 	}
 
-	vkms_state->crc_data = crc_data;
+	vkms_state->data = data;
 
 	__drm_atomic_helper_plane_duplicate_state(plane,
 						  &vkms_state->base);
@@ -49,12 +49,12 @@ static void vkms_plane_destroy_state(struct drm_plane *plane,
 		/* dropping the reference we acquired in
 		 * vkms_primary_plane_update()
 		 */
-		if (drm_framebuffer_read_refcount(&vkms_state->crc_data->fb))
-			drm_framebuffer_put(&vkms_state->crc_data->fb);
+		if (drm_framebuffer_read_refcount(&vkms_state->data->fb))
+			drm_framebuffer_put(&vkms_state->data->fb);
 	}
 
-	kfree(vkms_state->crc_data);
-	vkms_state->crc_data = NULL;
+	kfree(vkms_state->data);
+	vkms_state->data = NULL;
 
 	__drm_atomic_helper_plane_destroy_state(old_state);
 	kfree(vkms_state);
@@ -91,21 +91,21 @@ static void vkms_plane_atomic_update(struct drm_plane *plane,
 {
 	struct vkms_plane_state *vkms_plane_state;
 	struct drm_framebuffer *fb = plane->state->fb;
-	struct vkms_crc_data *crc_data;
+	struct vkms_data *data;
 
 	if (!plane->state->crtc || !fb)
 		return;
 
 	vkms_plane_state = to_vkms_plane_state(plane->state);
 
-	crc_data = vkms_plane_state->crc_data;
-	memcpy(&crc_data->src, &plane->state->src, sizeof(struct drm_rect));
-	memcpy(&crc_data->dst, &plane->state->dst, sizeof(struct drm_rect));
-	memcpy(&crc_data->fb, fb, sizeof(struct drm_framebuffer));
-	drm_framebuffer_get(&crc_data->fb);
-	crc_data->offset = fb->offsets[0];
-	crc_data->pitch = fb->pitches[0];
-	crc_data->cpp = fb->format->cpp[0];
+	data = vkms_plane_state->data;
+	memcpy(&data->src, &plane->state->src, sizeof(struct drm_rect));
+	memcpy(&data->dst, &plane->state->dst, sizeof(struct drm_rect));
+	memcpy(&data->fb, fb, sizeof(struct drm_framebuffer));
+	drm_framebuffer_get(&data->fb);
+	data->offset = fb->offsets[0];
+	data->pitch = fb->pitches[0];
+	data->cpp = fb->format->cpp[0];
 }
 
 static int vkms_plane_atomic_check(struct drm_plane *plane,
-- 
2.21.0
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux