Skip to contentSkip to conversation

drm/amdgpu: rename static functions in amdgpu_display.c

PATCH In review Samuel Li 3 participants 15 messages Jan 22, 2018 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

Samuel Li

author
#0 lore raw

PATCH 1/13 drm/amdgpu: rename static functions in amdgpu_display.c

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 41 ++++++++++++++++-------------
 1 file changed, 22 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +22 -19
index 22edfe0..cbf8a74 100644
@@ -37,7 +37,8 @@
 #include <drm/drm_edid.h>
 #include <drm/drm_fb_helper.h>
 
-static void amdgpu_flip_callback(struct dma_fence *f, struct dma_fence_cb *cb)
+static void amdgpu_display_flip_callback(struct dma_fence *f,
+					 struct dma_fence_cb *cb)
 {
 	struct amdgpu_flip_work *work =
 		container_of(cb, struct amdgpu_flip_work, cb);
@@ -46,8 +47,8 @@ static void amdgpu_flip_callback(struct dma_fence *f, struct dma_fence_cb *cb)
 	schedule_work(&work->flip_work.work);
 }
 
-static bool amdgpu_flip_handle_fence(struct amdgpu_flip_work *work,
-				     struct dma_fence **f)
+static bool amdgpu_display_flip_handle_fence(struct amdgpu_flip_work *work,
+					     struct dma_fence **f)
 {
 	struct dma_fence *fence= *f;
 
@@ -56,14 +57,15 @@ static bool amdgpu_flip_handle_fence(struct amdgpu_flip_work *work,
 
 	*f = NULL;
 
-	if (!dma_fence_add_callback(fence, &work->cb, amdgpu_flip_callback))
+	if (!dma_fence_add_callback(fence, &work->cb,
+				    amdgpu_display_flip_callback))
 		return true;
 
 	dma_fence_put(fence);
 	return false;
 }
 
-static void amdgpu_flip_work_func(struct work_struct *__work)
+static void amdgpu_display_flip_work_func(struct work_struct *__work)
 {
 	struct delayed_work *delayed_work =
 		container_of(__work, struct delayed_work, work);
@@ -77,11 +79,11 @@ static void amdgpu_flip_work_func(struct work_struct *__work)
 	unsigned i;
 	int vpos, hpos;
 
-	if (amdgpu_flip_handle_fence(work, &work->excl))
+	if (amdgpu_display_flip_handle_fence(work, &work->excl))
 		return;
 
 	for (i = 0; i < work->shared_count; ++i)
-		if (amdgpu_flip_handle_fence(work, &work->shared[i]))
+		if (amdgpu_display_flip_handle_fence(work, &work->shared[i]))
 			return;
 
 	/* Wait until we're out of the vertical blank period before the one
@@ -118,7 +120,7 @@ static void amdgpu_flip_work_func(struct work_struct *__work)
 /*
  * Handle unpin events outside the interrupt handler proper.
  */
-static void amdgpu_unpin_work_func(struct work_struct *__work)
+static void amdgpu_display_unpin_work_func(struct work_struct *__work)
 {
 	struct amdgpu_flip_work *work =
 		container_of(__work, struct amdgpu_flip_work, unpin_work);
@@ -163,8 +165,8 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
 	if (work == NULL)
 		return -ENOMEM;
 
-	INIT_DELAYED_WORK(&work->flip_work, amdgpu_flip_work_func);
-	INIT_WORK(&work->unpin_work, amdgpu_unpin_work_func);
+	INIT_DELAYED_WORK(&work->flip_work, amdgpu_display_flip_work_func);
+	INIT_WORK(&work->unpin_work, amdgpu_display_unpin_work_func);
 
 	work->event = event;
 	work->adev = adev;
@@ -229,7 +231,7 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
 	/* update crtc fb */
 	crtc->primary->fb = fb;
 	spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-	amdgpu_flip_work_func(&work->flip_work.work);
+	amdgpu_display_flip_work_func(&work->flip_work.work);
 	return 0;
 
 pflip_cleanup:
@@ -480,7 +482,7 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector,
 	return true;
 }
 
-static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb)
+static void amdgpu_display_user_framebuffer_destroy(struct drm_framebuffer *fb)
 {
 	struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);
 
@@ -489,9 +491,10 @@ static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb)
 	kfree(amdgpu_fb);
 }
 
-static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb,
-						  struct drm_file *file_priv,
-						  unsigned int *handle)
+static int amdgpu_display_user_framebuffer_create_handle(
+			struct drm_framebuffer *fb,
+			struct drm_file *file_priv,
+			unsigned int *handle)
 {
 	struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);
 
@@ -499,8 +502,8 @@ static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb,
 }
 
 static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
-	.destroy = amdgpu_user_framebuffer_destroy,
-	.create_handle = amdgpu_user_framebuffer_create_handle,
+	.destroy = amdgpu_display_user_framebuffer_destroy,
+	.create_handle = amdgpu_display_user_framebuffer_create_handle,
 };
 
 uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)
@@ -667,7 +670,7 @@ void amdgpu_update_display_priority(struct amdgpu_device *adev)
 
 }
 
-static bool is_hdtv_mode(const struct drm_display_mode *mode)
+static bool amdgpu_display_is_hdtv_mode(const struct drm_display_mode *mode)
 {
 	/* try and guess if this is a tv or a monitor */
 	if ((mode->vdisplay == 480 && mode->hdisplay == 720) || /* 480p */
@@ -724,7 +727,7 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
 		    ((amdgpu_encoder->underscan_type == UNDERSCAN_ON) ||
 		     ((amdgpu_encoder->underscan_type == UNDERSCAN_AUTO) &&
 		      drm_detect_hdmi_monitor(amdgpu_connector_edid(connector)) &&
-		      is_hdtv_mode(mode)))) {
+		      amdgpu_display_is_hdtv_mode(mode)))) {
 			if (amdgpu_encoder->underscan_hborder != 0)
 				amdgpu_crtc->h_border = amdgpu_encoder->underscan_hborder;
 			else
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1516649894-4518-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/13 drm/amdgpu: rename amdgpu_crtc_page_flip_target

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 10 +++++-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h    | 10 +++++-----
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       |  2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       |  2 +-
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c    |  2 +-
 7 files changed, 15 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +5 -5
index cbf8a74..55997d4 100644
@@ -142,11 +142,11 @@ static void amdgpu_display_unpin_work_func(struct work_struct *__work)
 	kfree(work);
 }
 
-int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
-				 struct drm_framebuffer *fb,
-				 struct drm_pending_vblank_event *event,
-				 uint32_t page_flip_flags, uint32_t target,
-				 struct drm_modeset_acquire_ctx *ctx)
+int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
+				struct drm_framebuffer *fb,
+				struct drm_pending_vblank_event *event,
+				uint32_t page_flip_flags, uint32_t target,
+				struct drm_modeset_acquire_ctx *ctx)
 {
 	struct drm_device *dev = crtc->dev;
 	struct amdgpu_device *adev = dev->dev_private;
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +5 -5
index 5a14be4..9e99679 100644
@@ -670,11 +670,11 @@ void amdgpu_print_display_setup(struct drm_device *dev);
 int amdgpu_modeset_create_props(struct amdgpu_device *adev);
 int amdgpu_crtc_set_config(struct drm_mode_set *set,
 			   struct drm_modeset_acquire_ctx *ctx);
-int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
-				 struct drm_framebuffer *fb,
-				 struct drm_pending_vblank_event *event,
-				 uint32_t page_flip_flags, uint32_t target,
-				 struct drm_modeset_acquire_ctx *ctx);
+int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
+				struct drm_framebuffer *fb,
+				struct drm_pending_vblank_event *event,
+				uint32_t page_flip_flags, uint32_t target,
+				struct drm_modeset_acquire_ctx *ctx);
 extern const struct drm_mode_config_funcs amdgpu_mode_funcs;
 
 #endif
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
index 5590bf1..751b52f 100644
@@ -2519,7 +2519,7 @@ static const struct drm_crtc_funcs dce_v10_0_crtc_funcs = {
 	.gamma_set = dce_v10_0_crtc_gamma_set,
 	.set_config = amdgpu_crtc_set_config,
 	.destroy = dce_v10_0_crtc_destroy,
-	.page_flip_target = amdgpu_crtc_page_flip_target,
+	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
 
 static void dce_v10_0_crtc_dpms(struct drm_crtc *crtc, int mode)
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
index 8ee4fc4..6502e5f 100644
@@ -2594,7 +2594,7 @@ static const struct drm_crtc_funcs dce_v11_0_crtc_funcs = {
 	.gamma_set = dce_v11_0_crtc_gamma_set,
 	.set_config = amdgpu_crtc_set_config,
 	.destroy = dce_v11_0_crtc_destroy,
-	.page_flip_target = amdgpu_crtc_page_flip_target,
+	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
 
 static void dce_v11_0_crtc_dpms(struct drm_crtc *crtc, int mode)
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -1
index c943ad1..433de9f 100644
@@ -2409,7 +2409,7 @@ static const struct drm_crtc_funcs dce_v6_0_crtc_funcs = {
 	.gamma_set = dce_v6_0_crtc_gamma_set,
 	.set_config = amdgpu_crtc_set_config,
 	.destroy = dce_v6_0_crtc_destroy,
-	.page_flip_target = amdgpu_crtc_page_flip_target,
+	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
 
 static void dce_v6_0_crtc_dpms(struct drm_crtc *crtc, int mode)
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -1
index c02308c..0988751 100644
@@ -2423,7 +2423,7 @@ static const struct drm_crtc_funcs dce_v8_0_crtc_funcs = {
 	.gamma_set = dce_v8_0_crtc_gamma_set,
 	.set_config = amdgpu_crtc_set_config,
 	.destroy = dce_v8_0_crtc_destroy,
-	.page_flip_target = amdgpu_crtc_page_flip_target,
+	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
 
 static void dce_v8_0_crtc_dpms(struct drm_crtc *crtc, int mode)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1 -1
index 695b600..7b03787 100644
@@ -132,7 +132,7 @@ static const struct drm_crtc_funcs dce_virtual_crtc_funcs = {
 	.gamma_set = dce_virtual_crtc_gamma_set,
 	.set_config = amdgpu_crtc_set_config,
 	.destroy = dce_virtual_crtc_destroy,
-	.page_flip_target = amdgpu_crtc_page_flip_target,
+	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
 
 static void dce_virtual_crtc_dpms(struct drm_crtc *crtc, int mode)
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#3 lore raw

PATCH 3/13 drm/amdgpu: rename amdgpu_crtc_set_config

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h    | 4 ++--
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c    | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2 -2
index 55997d4..4f9c880 100644
@@ -257,8 +257,8 @@ int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
 	return r;
 }
 
-int amdgpu_crtc_set_config(struct drm_mode_set *set,
-			   struct drm_modeset_acquire_ctx *ctx)
+int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
+				   struct drm_modeset_acquire_ctx *ctx)
 {
 	struct drm_device *dev;
 	struct amdgpu_device *adev;
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +2 -2
index 9e99679..83205a0 100644
@@ -668,8 +668,8 @@ int amdgpu_align_pitch(struct amdgpu_device *adev, int width, int bpp, bool tile
 /* amdgpu_display.c */
 void amdgpu_print_display_setup(struct drm_device *dev);
 int amdgpu_modeset_create_props(struct amdgpu_device *adev);
-int amdgpu_crtc_set_config(struct drm_mode_set *set,
-			   struct drm_modeset_acquire_ctx *ctx);
+int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
+				   struct drm_modeset_acquire_ctx *ctx);
 int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
 				struct drm_framebuffer *fb,
 				struct drm_pending_vblank_event *event,
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
index 751b52f..a5d401a 100644
@@ -2517,7 +2517,7 @@ static const struct drm_crtc_funcs dce_v10_0_crtc_funcs = {
 	.cursor_set2 = dce_v10_0_crtc_cursor_set2,
 	.cursor_move = dce_v10_0_crtc_cursor_move,
 	.gamma_set = dce_v10_0_crtc_gamma_set,
-	.set_config = amdgpu_crtc_set_config,
+	.set_config = amdgpu_display_crtc_set_config,
 	.destroy = dce_v10_0_crtc_destroy,
 	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
index 6502e5f..90900f7 100644
@@ -2592,7 +2592,7 @@ static const struct drm_crtc_funcs dce_v11_0_crtc_funcs = {
 	.cursor_set2 = dce_v11_0_crtc_cursor_set2,
 	.cursor_move = dce_v11_0_crtc_cursor_move,
 	.gamma_set = dce_v11_0_crtc_gamma_set,
-	.set_config = amdgpu_crtc_set_config,
+	.set_config = amdgpu_display_crtc_set_config,
 	.destroy = dce_v11_0_crtc_destroy,
 	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -1
index 433de9f..9d4eeeb 100644
@@ -2407,7 +2407,7 @@ static const struct drm_crtc_funcs dce_v6_0_crtc_funcs = {
 	.cursor_set2 = dce_v6_0_crtc_cursor_set2,
 	.cursor_move = dce_v6_0_crtc_cursor_move,
 	.gamma_set = dce_v6_0_crtc_gamma_set,
-	.set_config = amdgpu_crtc_set_config,
+	.set_config = amdgpu_display_crtc_set_config,
 	.destroy = dce_v6_0_crtc_destroy,
 	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -1
index 0988751..6fb31aa 100644
@@ -2421,7 +2421,7 @@ static const struct drm_crtc_funcs dce_v8_0_crtc_funcs = {
 	.cursor_set2 = dce_v8_0_crtc_cursor_set2,
 	.cursor_move = dce_v8_0_crtc_cursor_move,
 	.gamma_set = dce_v8_0_crtc_gamma_set,
-	.set_config = amdgpu_crtc_set_config,
+	.set_config = amdgpu_display_crtc_set_config,
 	.destroy = dce_v8_0_crtc_destroy,
 	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1 -1
index 7b03787..0c3d250 100644
@@ -130,7 +130,7 @@ static const struct drm_crtc_funcs dce_virtual_crtc_funcs = {
 	.cursor_set2 = NULL,
 	.cursor_move = NULL,
 	.gamma_set = dce_virtual_crtc_gamma_set,
-	.set_config = amdgpu_crtc_set_config,
+	.set_config = amdgpu_display_crtc_set_config,
 	.destroy = dce_virtual_crtc_destroy,
 	.page_flip_target = amdgpu_display_crtc_page_flip_target,
 };
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#4 lore raw

PATCH 4/13 drm/amdgpu: rename amdgpu_print_display_setup

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h    | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
index 4f9c880..cb01c5c 100644
@@ -355,7 +355,7 @@ static const char *hpd_names[6] = {
 	"HPD6",
 };
 
-void amdgpu_print_display_setup(struct drm_device *dev)
+void amdgpu_display_print_display_setup(struct drm_device *dev)
 {
 	struct drm_connector *connector;
 	struct amdgpu_connector *amdgpu_connector;
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +1 -1
index 83205a0..fa5dda0 100644
@@ -666,7 +666,7 @@ bool amdgpu_fbdev_robj_is_fb(struct amdgpu_device *adev, struct amdgpu_bo *robj)
 int amdgpu_align_pitch(struct amdgpu_device *adev, int width, int bpp, bool tiled);
 
 /* amdgpu_display.c */
-void amdgpu_print_display_setup(struct drm_device *dev);
+void amdgpu_display_print_display_setup(struct drm_device *dev);
 int amdgpu_modeset_create_props(struct amdgpu_device *adev);
 int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
 				   struct drm_modeset_acquire_ctx *ctx);
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
index a5d401a..fa8bf00 100644
@@ -2841,7 +2841,7 @@ static int dce_v10_0_sw_init(void *handle)
 	}
 
 	if (amdgpu_atombios_get_connector_info_from_object_table(adev))
-		amdgpu_print_display_setup(adev->ddev);
+		amdgpu_display_print_display_setup(adev->ddev);
 	else
 		return -EINVAL;
 
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
index 90900f7..b8baa73 100644
@@ -2957,7 +2957,7 @@ static int dce_v11_0_sw_init(void *handle)
 	}
 
 	if (amdgpu_atombios_get_connector_info_from_object_table(adev))
-		amdgpu_print_display_setup(adev->ddev);
+		amdgpu_display_print_display_setup(adev->ddev);
 	else
 		return -EINVAL;
 
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -1
index 9d4eeeb..91b91a6 100644
@@ -2711,7 +2711,7 @@ static int dce_v6_0_sw_init(void *handle)
 
 	ret = amdgpu_atombios_get_connector_info_from_object_table(adev);
 	if (ret)
-		amdgpu_print_display_setup(adev->ddev);
+		amdgpu_display_print_display_setup(adev->ddev);
 	else
 		return -EINVAL;
 
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -1
index 6fb31aa..1386424 100644
@@ -2741,7 +2741,7 @@ static int dce_v8_0_sw_init(void *handle)
 	}
 
 	if (amdgpu_atombios_get_connector_info_from_object_table(adev))
-		amdgpu_print_display_setup(adev->ddev);
+		amdgpu_display_print_display_setup(adev->ddev);
 	else
 		return -EINVAL;
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#5 lore raw

PATCH 5/13 drm/amdgpu: rename amdgpu_ddc_probe

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 10 ++++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c    |  6 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h       |  3 ++-
 3 files changed, 11 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +6 -4
index 8ca3783..ffc1f6f 100644
@@ -877,7 +877,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force)
 		ret = connector_status_disconnected;
 
 	if (amdgpu_connector->ddc_bus)
-		dret = amdgpu_ddc_probe(amdgpu_connector, false);
+		dret = amdgpu_display_ddc_probe(amdgpu_connector, false);
 	if (dret) {
 		amdgpu_connector->detected_by_load = false;
 		amdgpu_connector_free_edid(connector);
@@ -998,7 +998,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)
 	}
 
 	if (amdgpu_connector->ddc_bus)
-		dret = amdgpu_ddc_probe(amdgpu_connector, false);
+		dret = amdgpu_display_ddc_probe(amdgpu_connector, false);
 	if (dret) {
 		amdgpu_connector->detected_by_load = false;
 		amdgpu_connector_free_edid(connector);
@@ -1401,7 +1401,8 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 			/* setup ddc on the bridge */
 			amdgpu_atombios_encoder_setup_ext_encoder_ddc(encoder);
 			/* bridge chips are always aux */
-			if (amdgpu_ddc_probe(amdgpu_connector, true)) /* try DDC */
+			/* try DDC */
+			if (amdgpu_display_ddc_probe(amdgpu_connector, true))
 				ret = connector_status_connected;
 			else if (amdgpu_connector->dac_load_detect) { /* try load detection */
 				const struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
@@ -1421,7 +1422,8 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 					ret = connector_status_connected;
 			} else {
 				/* try non-aux ddc (DP to DVI/HDMI/etc. adapter) */
-				if (amdgpu_ddc_probe(amdgpu_connector, false))
+				if (amdgpu_display_ddc_probe(amdgpu_connector,
+							     false))
 					ret = connector_status_connected;
 			}
 		}
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +3 -3
index cb01c5c..ebf4145 100644
@@ -432,11 +432,11 @@ void amdgpu_display_print_display_setup(struct drm_device *dev)
 }
 
 /**
- * amdgpu_ddc_probe
+ * amdgpu_display_ddc_probe
  *
  */
-bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector,
-		       bool use_aux)
+bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector,
+			      bool use_aux)
 {
 	u8 out = 0x0;
 	u8 buf[8];
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +2 -1
index fa5dda0..00f8ef3 100644
@@ -631,7 +631,8 @@ bool amdgpu_dig_monitor_is_duallink(struct drm_encoder *encoder,
 u16 amdgpu_encoder_get_dp_bridge_encoder_id(struct drm_encoder *encoder);
 struct drm_encoder *amdgpu_get_external_encoder(struct drm_encoder *encoder);
 
-bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector, bool use_aux);
+bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector,
+			      bool use_aux);
 
 void amdgpu_encoder_set_active_device(struct drm_encoder *encoder);
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#6 lore raw

PATCH 6/13 drm/amdgpu: rename amdgpu_framebuffer_init

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 11 +++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c      |  3 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h    |  8 ++++----
 3 files changed, 11 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +5 -6
index ebf4145..c14b578 100644
@@ -520,11 +520,10 @@ uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)
 	return domain;
 }
 
-int
-amdgpu_framebuffer_init(struct drm_device *dev,
-			struct amdgpu_framebuffer *rfb,
-			const struct drm_mode_fb_cmd2 *mode_cmd,
-			struct drm_gem_object *obj)
+int amdgpu_display_framebuffer_init(struct drm_device *dev,
+				    struct amdgpu_framebuffer *rfb,
+				    const struct drm_mode_fb_cmd2 *mode_cmd,
+				    struct drm_gem_object *obj)
 {
 	int ret;
 	rfb->obj = obj;
@@ -565,7 +564,7 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
 		return ERR_PTR(-ENOMEM);
 	}
 
-	ret = amdgpu_framebuffer_init(dev, amdgpu_fb, mode_cmd, obj);
+	ret = amdgpu_display_framebuffer_init(dev, amdgpu_fb, mode_cmd, obj);
 	if (ret) {
 		kfree(amdgpu_fb);
 		drm_gem_object_put_unlocked(obj);
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +2 -1
index a7423dd..1206301 100644
@@ -227,7 +227,8 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
 	info->par = rfbdev;
 	info->skip_vt_switch = true;
 
-	ret = amdgpu_framebuffer_init(adev->ddev, &rfbdev->rfb, &mode_cmd, gobj);
+	ret = amdgpu_display_framebuffer_init(adev->ddev, &rfbdev->rfb,
+					      &mode_cmd, gobj);
 	if (ret) {
 		DRM_ERROR("failed to initialize framebuffer %d\n", ret);
 		goto out;
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +4 -4
index 00f8ef3..1e8806edf 100644
@@ -641,10 +641,10 @@ int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
 			       ktime_t *stime, ktime_t *etime,
 			       const struct drm_display_mode *mode);
 
-int amdgpu_framebuffer_init(struct drm_device *dev,
-			     struct amdgpu_framebuffer *rfb,
-			     const struct drm_mode_fb_cmd2 *mode_cmd,
-			     struct drm_gem_object *obj);
+int amdgpu_display_framebuffer_init(struct drm_device *dev,
+				    struct amdgpu_framebuffer *rfb,
+				    const struct drm_mode_fb_cmd2 *mode_cmd,
+				    struct drm_gem_object *obj);
 
 int amdgpufb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#7 lore raw

PATCH 7/13 drm/amdgpu: rename amdgpu_user_framebuffer_create

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 8 ++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.h       | 6 +++---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +4 -4
index c14b578..14896e2 100644
@@ -537,9 +537,9 @@ int amdgpu_display_framebuffer_init(struct drm_device *dev,
 }
 
 struct drm_framebuffer *
-amdgpu_user_framebuffer_create(struct drm_device *dev,
-			       struct drm_file *file_priv,
-			       const struct drm_mode_fb_cmd2 *mode_cmd)
+amdgpu_display_user_framebuffer_create(struct drm_device *dev,
+				       struct drm_file *file_priv,
+				       const struct drm_mode_fb_cmd2 *mode_cmd)
 {
 	struct drm_gem_object *obj;
 	struct amdgpu_framebuffer *amdgpu_fb;
@@ -575,7 +575,7 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
 }
 
 const struct drm_mode_config_funcs amdgpu_mode_funcs = {
-	.fb_create = amdgpu_user_framebuffer_create,
+	.fb_create = amdgpu_display_user_framebuffer_create,
 	.output_poll_changed = drm_fb_helper_output_poll_changed,
 };
 
drivers/gpu/drm/amd/amdgpu/amdgpu_display.h +3 -3
index 1ef79d2..2b11d808 100644
@@ -25,8 +25,8 @@
 
 uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev);
 struct drm_framebuffer *
-amdgpu_user_framebuffer_create(struct drm_device *dev,
-			       struct drm_file *file_priv,
-			       const struct drm_mode_fb_cmd2 *mode_cmd);
+amdgpu_display_user_framebuffer_create(struct drm_device *dev,
+				       struct drm_file *file_priv,
+				       const struct drm_mode_fb_cmd2 *mode_cmd);
 
 #endif
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index ebcad30..b0205b8 100644
@@ -826,7 +826,7 @@ dm_atomic_state_alloc_free(struct drm_atomic_state *state)
 }
 
 static const struct drm_mode_config_funcs amdgpu_dm_mode_funcs = {
-	.fb_create = amdgpu_user_framebuffer_create,
+	.fb_create = amdgpu_display_user_framebuffer_create,
 	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = amdgpu_dm_atomic_check,
 	.atomic_commit = amdgpu_dm_atomic_commit,
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#8 lore raw

PATCH 8/13 drm/amdgpu: rename amdgpu_modeset_create_props

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h          | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c            | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c            | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c             | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c             | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c          | 2 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
index 14896e2..73f3759 100644
@@ -597,7 +597,7 @@ static const struct drm_prop_enum_list amdgpu_dither_enum_list[] =
 	{ AMDGPU_FMT_DITHER_ENABLE, "on" },
 };
 
-int amdgpu_modeset_create_props(struct amdgpu_device *adev)
+int amdgpu_display_modeset_create_props(struct amdgpu_device *adev)
 {
 	int sz;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +1 -1
index 1e8806edf..9b0d34f 100644
@@ -668,7 +668,7 @@ int amdgpu_align_pitch(struct amdgpu_device *adev, int width, int bpp, bool tile
 
 /* amdgpu_display.c */
 void amdgpu_display_print_display_setup(struct drm_device *dev);
-int amdgpu_modeset_create_props(struct amdgpu_device *adev);
+int amdgpu_display_modeset_create_props(struct amdgpu_device *adev);
 int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
 				   struct drm_modeset_acquire_ctx *ctx);
 int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
index fa8bf00..256e528 100644
@@ -2826,7 +2826,7 @@ static int dce_v10_0_sw_init(void *handle)
 
 	adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
 
-	r = amdgpu_modeset_create_props(adev);
+	r = amdgpu_display_modeset_create_props(adev);
 	if (r)
 		return r;
 
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
index b8baa73..1ae6765 100644
@@ -2941,7 +2941,7 @@ static int dce_v11_0_sw_init(void *handle)
 
 	adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
 
-	r = amdgpu_modeset_create_props(adev);
+	r = amdgpu_display_modeset_create_props(adev);
 	if (r)
 		return r;
 
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -1
index 91b91a6..af82e39 100644
@@ -2695,7 +2695,7 @@ static int dce_v6_0_sw_init(void *handle)
 	adev->ddev->mode_config.prefer_shadow = 1;
 	adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
 
-	r = amdgpu_modeset_create_props(adev);
+	r = amdgpu_display_modeset_create_props(adev);
 	if (r)
 		return r;
 
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -1
index 1386424..af0c237 100644
@@ -2726,7 +2726,7 @@ static int dce_v8_0_sw_init(void *handle)
 
 	adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
 
-	r = amdgpu_modeset_create_props(adev);
+	r = amdgpu_display_modeset_create_props(adev);
 	if (r)
 		return r;
 
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1 -1
index 0c3d250..3d1954a 100644
@@ -408,7 +408,7 @@ static int dce_virtual_sw_init(void *handle)
 
 	adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
 
-	r = amdgpu_modeset_create_props(adev);
+	r = amdgpu_display_modeset_create_props(adev);
 	if (r)
 		return r;
 
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index b0205b8..1d538c0 100644
@@ -1316,7 +1316,7 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev)
 
 	adev->ddev->mode_config.fb_base = adev->gmc.aper_base;
 
-	r = amdgpu_modeset_create_props(adev);
+	r = amdgpu_display_modeset_create_props(adev);
 	if (r)
 		return r;
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#9 lore raw

PATCH 9/13 drm/amdgpu: rename amdgpu_update_display_priority

In reply to a message not in the archive

Rename as amdgpu_display_update_priority for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h         | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
index 93eae39..f02b7f8 100644
@@ -1834,7 +1834,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
 			      struct amdgpu_job* job, bool force);
 void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
 bool amdgpu_device_need_post(struct amdgpu_device *adev);
-void amdgpu_update_display_priority(struct amdgpu_device *adev);
+void amdgpu_display_update_priority(struct amdgpu_device *adev);
 
 void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes,
 				  u64 num_vis_bytes);
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
index 73f3759..733f5a0 100644
@@ -659,7 +659,7 @@ int amdgpu_display_modeset_create_props(struct amdgpu_device *adev)
 	return 0;
 }
 
-void amdgpu_update_display_priority(struct amdgpu_device *adev)
+void amdgpu_display_update_priority(struct amdgpu_device *adev)
 {
 	/* adjustment options for the display watermarks */
 	if ((amdgpu_disp_priority == 0) || (amdgpu_disp_priority > 2))
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
index 256e528..ad5e74a 100644
@@ -1205,7 +1205,7 @@ static void dce_v10_0_bandwidth_update(struct amdgpu_device *adev)
 	u32 num_heads = 0, lb_size;
 	int i;
 
-	amdgpu_update_display_priority(adev);
+	amdgpu_display_update_priority(adev);
 
 	for (i = 0; i < adev->mode_info.num_crtc; i++) {
 		if (adev->mode_info.crtcs[i]->base.enabled)
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
index 1ae6765..dbf9d75 100644
@@ -1229,7 +1229,7 @@ static void dce_v11_0_bandwidth_update(struct amdgpu_device *adev)
 	u32 num_heads = 0, lb_size;
 	int i;
 
-	amdgpu_update_display_priority(adev);
+	amdgpu_display_update_priority(adev);
 
 	for (i = 0; i < adev->mode_info.num_crtc; i++) {
 		if (adev->mode_info.crtcs[i]->base.enabled)
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -1
index af82e39..4161417 100644
@@ -1108,7 +1108,7 @@ static void dce_v6_0_bandwidth_update(struct amdgpu_device *adev)
 	if (!adev->mode_info.mode_config_initialized)
 		return;
 
-	amdgpu_update_display_priority(adev);
+	amdgpu_display_update_priority(adev);
 
 	for (i = 0; i < adev->mode_info.num_crtc; i++) {
 		if (adev->mode_info.crtcs[i]->base.enabled)
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -1
index af0c237..ff29f30 100644
@@ -1144,7 +1144,7 @@ static void dce_v8_0_bandwidth_update(struct amdgpu_device *adev)
 	u32 num_heads = 0, lb_size;
 	int i;
 
-	amdgpu_update_display_priority(adev);
+	amdgpu_display_update_priority(adev);
 
 	for (i = 0; i < adev->mode_info.num_crtc; i++) {
 		if (adev->mode_info.crtcs[i]->base.enabled)
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#10 lore raw

PATCH 10/13 drm/amdgpu: rename amdgpu_crtc_scaling_mode_fixup

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h    | 6 +++---
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c      | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c       | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c       | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +3 -3
index 733f5a0..3654157 100644
@@ -681,9 +681,9 @@ static bool amdgpu_display_is_hdtv_mode(const struct drm_display_mode *mode)
 		return false;
 }
 
-bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
-				    const struct drm_display_mode *mode,
-				    struct drm_display_mode *adjusted_mode)
+bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
+					const struct drm_display_mode *mode,
+					struct drm_display_mode *adjusted_mode)
 {
 	struct drm_device *dev = crtc->dev;
 	struct drm_encoder *encoder;
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +3 -3
index 9b0d34f..6111150 100644
@@ -650,9 +650,9 @@ int amdgpufb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
 
 void amdgpu_enc_destroy(struct drm_encoder *encoder);
 void amdgpu_copy_fb(struct drm_device *dev, struct drm_gem_object *dst_obj);
-bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
-					const struct drm_display_mode *mode,
-					struct drm_display_mode *adjusted_mode);
+bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
+				const struct drm_display_mode *mode,
+				struct drm_display_mode *adjusted_mode);
 void amdgpu_panel_mode_fixup(struct drm_encoder *encoder,
 			     struct drm_display_mode *adjusted_mode);
 int amdgpu_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc);
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +1 -1
index ad5e74a..865e8ca 100644
@@ -2676,7 +2676,7 @@ static bool dce_v10_0_crtc_mode_fixup(struct drm_crtc *crtc,
 		amdgpu_crtc->connector = NULL;
 		return false;
 	}
-	if (!amdgpu_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
+	if (!amdgpu_display_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
 		return false;
 	if (amdgpu_atombios_crtc_prepare_pll(crtc, adjusted_mode))
 		return false;
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +1 -1
index dbf9d75..fe88728 100644
@@ -2779,7 +2779,7 @@ static bool dce_v11_0_crtc_mode_fixup(struct drm_crtc *crtc,
 		amdgpu_crtc->connector = NULL;
 		return false;
 	}
-	if (!amdgpu_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
+	if (!amdgpu_display_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
 		return false;
 	if (amdgpu_atombios_crtc_prepare_pll(crtc, adjusted_mode))
 		return false;
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +1 -1
index 4161417..3436de3 100644
@@ -2562,7 +2562,7 @@ static bool dce_v6_0_crtc_mode_fixup(struct drm_crtc *crtc,
 		amdgpu_crtc->connector = NULL;
 		return false;
 	}
-	if (!amdgpu_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
+	if (!amdgpu_display_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
 		return false;
 	if (amdgpu_atombios_crtc_prepare_pll(crtc, adjusted_mode))
 		return false;
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +1 -1
index ff29f30..6f44146 100644
@@ -2587,7 +2587,7 @@ static bool dce_v8_0_crtc_mode_fixup(struct drm_crtc *crtc,
 		amdgpu_crtc->connector = NULL;
 		return false;
 	}
-	if (!amdgpu_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
+	if (!amdgpu_display_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
 		return false;
 	if (amdgpu_atombios_crtc_prepare_pll(crtc, adjusted_mode))
 		return false;
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#11 lore raw

PATCH 11/13 drm/amdgpu: rename amdgpu_get_crtc_scanoutpos

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 14 +++++++-------
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c           |  4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c           |  8 ++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h          | 10 +++++-----
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  6 +++---
 drivers/gpu/drm/amd/display/dc/dc_stream.h        |  2 +-
 6 files changed, 22 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +7 -7
index 3654157..d650e23 100644
@@ -90,9 +90,9 @@ static void amdgpu_display_flip_work_func(struct work_struct *__work)
 	 * targeted by the flip
 	 */
 	if (amdgpu_crtc->enabled &&
-	    (amdgpu_get_crtc_scanoutpos(adev->ddev, work->crtc_id, 0,
-					&vpos, &hpos, NULL, NULL,
-					&crtc->hwmode)
+	    (amdgpu_display_get_crtc_scanoutpos(adev->ddev, work->crtc_id, 0,
+						&vpos, &hpos, NULL, NULL,
+						&crtc->hwmode)
 	     & (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) ==
 	    (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK) &&
 	    (int)(work->target_vblank -
@@ -794,10 +794,10 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
  * unknown small number of scanlines wrt. real scanout position.
  *
  */
-int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
-			       unsigned int flags, int *vpos, int *hpos,
-			       ktime_t *stime, ktime_t *etime,
-			       const struct drm_display_mode *mode)
+int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev,
+			unsigned int pipe, unsigned int flags, int *vpos,
+			int *hpos, ktime_t *stime, ktime_t *etime,
+			const struct drm_display_mode *mode)
 {
 	u32 vbl = 0, position = 0;
 	int vbl_start, vbl_end, vtotal, ret = 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
index 24bc3e9..b10ffb2 100644
@@ -837,8 +837,8 @@ amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
 				 ktime_t *stime, ktime_t *etime,
 				 const struct drm_display_mode *mode)
 {
-	return amdgpu_get_crtc_scanoutpos(dev, pipe, 0, vpos, hpos,
-					  stime, etime, mode);
+	return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, hpos,
+						  stime, etime, mode);
 }
 
 static struct drm_driver kms_driver = {
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +4 -4
index 219b8a9..29fbcb7 100644
@@ -980,11 +980,11 @@ u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
 		 */
 		do {
 			count = amdgpu_display_vblank_get_counter(adev, pipe);
-			/* Ask amdgpu_get_crtc_scanoutpos to return vpos as
-			 * distance to start of vblank, instead of regular
-			 * vertical scanout pos.
+			/* Ask amdgpu_display_get_crtc_scanoutpos to return
+			 * vpos as distance to start of vblank, instead of
+			 * regular vertical scanout pos.
 			 */
-			stat = amdgpu_get_crtc_scanoutpos(
+			stat = amdgpu_display_get_crtc_scanoutpos(
 				dev, pipe, GET_DISTANCE_TO_VBLANKSTART,
 				&vpos, &hpos, NULL, NULL,
 				&adev->mode_info.crtcs[pipe]->base.hwmode);
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +5 -5
index 6111150..6e348fa 100644
@@ -612,7 +612,7 @@ struct amdgpu_mst_connector {
 #define ENCODER_MODE_IS_DP(em) (((em) == ATOM_ENCODER_MODE_DP) || \
 				((em) == ATOM_ENCODER_MODE_DP_MST))
 
-/* Driver internal use only flags of amdgpu_get_crtc_scanoutpos() */
+/* Driver internal use only flags of amdgpu_display_get_crtc_scanoutpos() */
 #define DRM_SCANOUTPOS_VALID        (1 << 0)
 #define DRM_SCANOUTPOS_IN_VBLANK    (1 << 1)
 #define DRM_SCANOUTPOS_ACCURATE     (1 << 2)
@@ -636,10 +636,10 @@ bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector,
 
 void amdgpu_encoder_set_active_device(struct drm_encoder *encoder);
 
-int amdgpu_get_crtc_scanoutpos(struct drm_device *dev, unsigned int pipe,
-			       unsigned int flags, int *vpos, int *hpos,
-			       ktime_t *stime, ktime_t *etime,
-			       const struct drm_display_mode *mode);
+int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev,
+			unsigned int pipe, unsigned int flags, int *vpos,
+			int *hpos, ktime_t *stime, ktime_t *etime,
+			const struct drm_display_mode *mode);
 
 int amdgpu_display_framebuffer_init(struct drm_device *dev,
 				    struct amdgpu_framebuffer *rfb,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
index 1d538c0..ccd89e5 100644
@@ -3944,9 +3944,9 @@ static void amdgpu_dm_do_flip(struct drm_crtc *crtc,
 	 * targeted by the flip
 	 */
 	while ((acrtc->enabled &&
-		(amdgpu_get_crtc_scanoutpos(adev->ddev, acrtc->crtc_id, 0,
-					&vpos, &hpos, NULL, NULL,
-					&crtc->hwmode)
+		(amdgpu_display_get_crtc_scanoutpos(adev->ddev, acrtc->crtc_id,
+						    0, &vpos, &hpos, NULL,
+						    NULL, &crtc->hwmode)
 		 & (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) ==
 		(DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK) &&
 		(int)(target_vblank -
drivers/gpu/drm/amd/display/dc/dc_stream.h +1 -1
index be3eb57f..c9e5fe8 100644
@@ -152,7 +152,7 @@ struct dc_stream_state *dc_get_stream_at_index(struct dc *dc, uint8_t i);
 uint32_t dc_stream_get_vblank_counter(const struct dc_stream_state *stream);
 
 /* TODO: Return parsed values rather than direct register read
- * This has a dependency on the caller (amdgpu_get_crtc_scanoutpos)
+ * This has a dependency on the caller (amdgpu_display_get_crtc_scanoutpos)
  * being refactored properly to be dce-specific
  */
 bool dc_stream_get_scanoutpos(const struct dc_stream_state *stream,
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#12 lore raw

PATCH 12/13 drm/amdgpu: rename amdgpu_crtc_idx_to_irq_type

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c       | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c           | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h          | 2 +-
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c            | 5 +++--
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c            | 6 ++++--
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c             | 6 ++++--
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c             | 6 ++++--
 drivers/gpu/drm/amd/amdgpu/dce_virtual.c          | 3 ++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 9 files changed, 22 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
index d650e23..4a2f4f0 100644
@@ -889,7 +889,7 @@ int amdgpu_display_get_crtc_scanoutpos(struct drm_device *dev,
 	return ret;
 }
 
-int amdgpu_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc)
+int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc)
 {
 	if (crtc < 0 || crtc >= adev->mode_info.num_crtc)
 		return AMDGPU_CRTC_IRQ_NONE;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -2
index 29fbcb7..c7eaf93 100644
@@ -1025,7 +1025,7 @@ u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
 int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
 {
 	struct amdgpu_device *adev = dev->dev_private;
-	int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe);
+	int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe);
 
 	return amdgpu_irq_get(adev, &adev->crtc_irq, idx);
 }
@@ -1041,7 +1041,7 @@ int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
 void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe)
 {
 	struct amdgpu_device *adev = dev->dev_private;
-	int idx = amdgpu_crtc_idx_to_irq_type(adev, pipe);
+	int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe);
 
 	amdgpu_irq_put(adev, &adev->crtc_irq, idx);
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +1 -1
index 6e348fa..7e6ab48 100644
@@ -655,7 +655,7 @@ bool amdgpu_display_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
 				struct drm_display_mode *adjusted_mode);
 void amdgpu_panel_mode_fixup(struct drm_encoder *encoder,
 			     struct drm_display_mode *adjusted_mode);
-int amdgpu_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc);
+int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc);
 
 /* fbdev layer */
 int amdgpu_fbdev_init(struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +3 -2
index 865e8ca..c7d1ef0 100644
@@ -2537,7 +2537,8 @@ static void dce_v10_0_crtc_dpms(struct drm_crtc *crtc, int mode)
 		amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
 		dce_v10_0_vga_enable(crtc, false);
 		/* Make sure VBLANK and PFLIP interrupts are still enabled */
-		type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
+		type = amdgpu_display_crtc_idx_to_irq_type(adev,
+						amdgpu_crtc->crtc_id);
 		amdgpu_irq_update(adev, &adev->crtc_irq, type);
 		amdgpu_irq_update(adev, &adev->pageflip_irq, type);
 		drm_crtc_vblank_on(crtc);
@@ -3249,7 +3250,7 @@ static int dce_v10_0_crtc_irq(struct amdgpu_device *adev,
 {
 	unsigned crtc = entry->src_id - 1;
 	uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
-	unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
+	unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, crtc);
 
 	switch (entry->src_data[0]) {
 	case 0: /* vblank */
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +4 -2
index fe88728..99bc1f36 100644
@@ -2612,7 +2612,8 @@ static void dce_v11_0_crtc_dpms(struct drm_crtc *crtc, int mode)
 		amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
 		dce_v11_0_vga_enable(crtc, false);
 		/* Make sure VBLANK and PFLIP interrupts are still enabled */
-		type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
+		type = amdgpu_display_crtc_idx_to_irq_type(adev,
+						amdgpu_crtc->crtc_id);
 		amdgpu_irq_update(adev, &adev->crtc_irq, type);
 		amdgpu_irq_update(adev, &adev->pageflip_irq, type);
 		drm_crtc_vblank_on(crtc);
@@ -3368,7 +3369,8 @@ static int dce_v11_0_crtc_irq(struct amdgpu_device *adev,
 {
 	unsigned crtc = entry->src_id - 1;
 	uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
-	unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
+	unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
+								    crtc);
 
 	switch (entry->src_data[0]) {
 	case 0: /* vblank */
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +4 -2
index 3436de3..24de4aa 100644
@@ -2425,7 +2425,8 @@ static void dce_v6_0_crtc_dpms(struct drm_crtc *crtc, int mode)
 		amdgpu_atombios_crtc_enable(crtc, ATOM_ENABLE);
 		amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
 		/* Make sure VBLANK and PFLIP interrupts are still enabled */
-		type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
+		type = amdgpu_display_crtc_idx_to_irq_type(adev,
+						amdgpu_crtc->crtc_id);
 		amdgpu_irq_update(adev, &adev->crtc_irq, type);
 		amdgpu_irq_update(adev, &adev->pageflip_irq, type);
 		drm_crtc_vblank_on(crtc);
@@ -2966,7 +2967,8 @@ static int dce_v6_0_crtc_irq(struct amdgpu_device *adev,
 {
 	unsigned crtc = entry->src_id - 1;
 	uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
-	unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
+	unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
+								    crtc);
 
 	switch (entry->src_data[0]) {
 	case 0: /* vblank */
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +4 -2
index 6f44146..823a8c3 100644
@@ -2441,7 +2441,8 @@ static void dce_v8_0_crtc_dpms(struct drm_crtc *crtc, int mode)
 		amdgpu_atombios_crtc_blank(crtc, ATOM_DISABLE);
 		dce_v8_0_vga_enable(crtc, false);
 		/* Make sure VBLANK and PFLIP interrupts are still enabled */
-		type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
+		type = amdgpu_display_crtc_idx_to_irq_type(adev,
+						amdgpu_crtc->crtc_id);
 		amdgpu_irq_update(adev, &adev->crtc_irq, type);
 		amdgpu_irq_update(adev, &adev->pageflip_irq, type);
 		drm_crtc_vblank_on(crtc);
@@ -3063,7 +3064,8 @@ static int dce_v8_0_crtc_irq(struct amdgpu_device *adev,
 {
 	unsigned crtc = entry->src_id - 1;
 	uint32_t disp_int = RREG32(interrupt_status_offsets[crtc].reg);
-	unsigned irq_type = amdgpu_crtc_idx_to_irq_type(adev, crtc);
+	unsigned int irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
+								    crtc);
 
 	switch (entry->src_data[0]) {
 	case 0: /* vblank */
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2 -1
index 3d1954a..3d6cb0c 100644
@@ -149,7 +149,8 @@ static void dce_virtual_crtc_dpms(struct drm_crtc *crtc, int mode)
 	case DRM_MODE_DPMS_ON:
 		amdgpu_crtc->enabled = true;
 		/* Make sure VBLANK interrupts are still enabled */
-		type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
+		type = amdgpu_display_crtc_idx_to_irq_type(adev,
+						amdgpu_crtc->crtc_id);
 		amdgpu_irq_update(adev, &adev->crtc_irq, type);
 		drm_crtc_vblank_on(crtc);
 		break;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index ccd89e5..f59ea78 100644
@@ -3725,7 +3725,7 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
 	 * constant is the same as PFLIP
 	 */
 	int irq_type =
-		amdgpu_crtc_idx_to_irq_type(
+		amdgpu_display_crtc_idx_to_irq_type(
 			adev,
 			acrtc->crtc_id);
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#13 lore raw

PATCH 13/13 drm/amdgpu: rename amdgpu_freesync_ioctl

In reply to a message not in the archive

Add display to the name for consistency.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h         | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c     | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -2
index f02b7f8..716fd13 100644
@@ -1256,8 +1256,8 @@ int amdgpu_cs_wait_fences_ioctl(struct drm_device *dev, void *data,
 int amdgpu_gem_metadata_ioctl(struct drm_device *dev, void *data,
 				struct drm_file *filp);
 
-int amdgpu_freesync_ioctl(struct drm_device *dev, void *data,
-			    struct drm_file *filp);
+int amdgpu_display_freesync_ioctl(struct drm_device *dev, void *data,
+				  struct drm_file *filp);
 
 /* VRAM scratch page for HDP bug, default vram page */
 struct amdgpu_vram_scratch {
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2 -2
index 4a2f4f0..5495b29 100644
@@ -912,8 +912,8 @@ int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc)
 	}
 }
 
-int amdgpu_freesync_ioctl(struct drm_device *dev, void *data,
-			    struct drm_file *filp)
+int amdgpu_display_freesync_ioctl(struct drm_device *dev, void *data,
+				  struct drm_file *filp)
 {
 	int ret = -EPERM;
 	struct amdgpu_device *adev = dev->dev_private;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -1
index c7eaf93..9a96064 100644
@@ -1064,7 +1064,7 @@ const struct drm_ioctl_desc amdgpu_ioctls_kms[] = {
 	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_VA, amdgpu_gem_va_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
 	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_OP, amdgpu_gem_op_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
 	DRM_IOCTL_DEF_DRV(AMDGPU_GEM_USERPTR, amdgpu_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
-	DRM_IOCTL_DEF_DRV(AMDGPU_FREESYNC, amdgpu_freesync_ioctl, DRM_MASTER)
+	DRM_IOCTL_DEF_DRV(AMDGPU_FREESYNC, amdgpu_display_freesync_ioctl, DRM_MASTER)
 };
 const int amdgpu_max_kms_ioctl = ARRAY_SIZE(amdgpu_ioctls_kms);
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#14 lore raw
In reply to a message not in the archive

Am 22.01.2018 um 20:38 schrieb Samuel Li:

Quoted 3 lines

Add display to the name for consistency.

Nice cleanup, series is Acked-by: Christian König <[email protected]>

Quoted 134 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 41 ++++++++++++++++-------------
  1 file changed, 22 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +21 -18
index 22edfe0..cbf8a74 100644
@@ -37,7 +37,8 @@
  #include <drm/drm_edid.h>
  #include <drm/drm_fb_helper.h>
 
-static void amdgpu_flip_callback(struct dma_fence *f, struct dma_fence_cb *cb)
+static void amdgpu_display_flip_callback(struct dma_fence *f,
+					 struct dma_fence_cb *cb)
  {
  	struct amdgpu_flip_work *work =
  		container_of(cb, struct amdgpu_flip_work, cb);
@@ -46,8 +47,8 @@ static void amdgpu_flip_callback(struct dma_fence *f, struct dma_fence_cb *cb)
  	schedule_work(&work->flip_work.work);
  }
 
-static bool amdgpu_flip_handle_fence(struct amdgpu_flip_work *work,
-				     struct dma_fence **f)
+static bool amdgpu_display_flip_handle_fence(struct amdgpu_flip_work *work,
+					     struct dma_fence **f)
  {
  	struct dma_fence *fence= *f;
 
@@ -56,14 +57,15 @@ static bool amdgpu_flip_handle_fence(struct amdgpu_flip_work *work,
 
  	*f = NULL;
 
-	if (!dma_fence_add_callback(fence, &work->cb, amdgpu_flip_callback))
+	if (!dma_fence_add_callback(fence, &work->cb,
+				    amdgpu_display_flip_callback))
  		return true;
 
  	dma_fence_put(fence);
  	return false;
  }
 
-static void amdgpu_flip_work_func(struct work_struct *__work)
+static void amdgpu_display_flip_work_func(struct work_struct *__work)
  {
  	struct delayed_work *delayed_work =
  		container_of(__work, struct delayed_work, work);
@@ -77,11 +79,11 @@ static void amdgpu_flip_work_func(struct work_struct *__work)
  	unsigned i;
  	int vpos, hpos;
 
-	if (amdgpu_flip_handle_fence(work, &work->excl))
+	if (amdgpu_display_flip_handle_fence(work, &work->excl))
  		return;
 
  	for (i = 0; i < work->shared_count; ++i)
-		if (amdgpu_flip_handle_fence(work, &work->shared[i]))
+		if (amdgpu_display_flip_handle_fence(work, &work->shared[i]))
  			return;
 
  	/* Wait until we're out of the vertical blank period before the one
@@ -118,7 +120,7 @@ static void amdgpu_flip_work_func(struct work_struct *__work)
  /*
   * Handle unpin events outside the interrupt handler proper.
   */
-static void amdgpu_unpin_work_func(struct work_struct *__work)
+static void amdgpu_display_unpin_work_func(struct work_struct *__work)
  {
  	struct amdgpu_flip_work *work =
  		container_of(__work, struct amdgpu_flip_work, unpin_work);
@@ -163,8 +165,8 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
  	if (work == NULL)
  		return -ENOMEM;
 
-	INIT_DELAYED_WORK(&work->flip_work, amdgpu_flip_work_func);
-	INIT_WORK(&work->unpin_work, amdgpu_unpin_work_func);
+	INIT_DELAYED_WORK(&work->flip_work, amdgpu_display_flip_work_func);
+	INIT_WORK(&work->unpin_work, amdgpu_display_unpin_work_func);
 
  	work->event = event;
  	work->adev = adev;
@@ -229,7 +231,7 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
  	/* update crtc fb */
  	crtc->primary->fb = fb;
  	spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-	amdgpu_flip_work_func(&work->flip_work.work);
+	amdgpu_display_flip_work_func(&work->flip_work.work);
  	return 0;
 
  pflip_cleanup:
@@ -480,7 +482,7 @@ bool amdgpu_ddc_probe(struct amdgpu_connector *amdgpu_connector,
  	return true;
  }
 
-static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb)
+static void amdgpu_display_user_framebuffer_destroy(struct drm_framebuffer *fb)
  {
  	struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);
 
@@ -489,9 +491,10 @@ static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb)
  	kfree(amdgpu_fb);
  }
 
-static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb,
-						  struct drm_file *file_priv,
-						  unsigned int *handle)
+static int amdgpu_display_user_framebuffer_create_handle(
+			struct drm_framebuffer *fb,
+			struct drm_file *file_priv,
+			unsigned int *handle)
  {
  	struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);
 
@@ -499,8 +502,8 @@ static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb,
  }
 
  static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
-	.destroy = amdgpu_user_framebuffer_destroy,
-	.create_handle = amdgpu_user_framebuffer_create_handle,
+	.destroy = amdgpu_display_user_framebuffer_destroy,
+	.create_handle = amdgpu_display_user_framebuffer_create_handle,
  };
 
  uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)
@@ -667,7 +670,7 @@ void amdgpu_update_display_priority(struct amdgpu_device *adev)
 
  }
 
-static bool is_hdtv_mode(const struct drm_display_mode *mode)
+static bool amdgpu_display_is_hdtv_mode(const struct drm_display_mode *mode)
  {
  	/* try and guess if this is a tv or a monitor */
  	if ((mode->vdisplay == 480 && mode->hdisplay == 720) || /* 480p */

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc, · line 733

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
@@ -724,7 +727,7 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
  		    ((amdgpu_encoder->underscan_type == UNDERSCAN_ON) ||
  		     ((amdgpu_encoder->underscan_type == UNDERSCAN_AUTO) &&
  		      drm_detect_hdmi_monitor(amdgpu_connector_edid(connector)) &&
-		      is_hdtv_mode(mode)))) {
+		      amdgpu_display_is_hdtv_mode(mode)))) {
  			if (amdgpu_encoder->underscan_hborder != 0)
  				amdgpu_crtc->h_border = amdgpu_encoder->underscan_hborder;
  			else

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 0ce90ad9-7453-9a02-0c75-27b1bc7539d8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by
#16 lore raw
Quoted 8 lines · Christian König

Am 22.01.2018 um 20:38 schrieb Samuel Li:

Quoted 4 lines

Add display to the name for consistency.

Nice cleanup, series is Acked-by: Christian König <[email protected]>

Nice work:

Quoted 143 lines
Quoted 143 lines

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 41
++++++++++++++++-------------
  1 file changed, 22 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +4 -1
index 22edfe0..cbf8a74 100644
@@ -37,7 +37,8 @@
  #include <drm/drm_edid.h>
  #include <drm/drm_fb_helper.h>
  -static void amdgpu_flip_callback(struct dma_fence *f, struct
 dma_fence_cb *cb)
+static void amdgpu_display_flip_callback(struct dma_fence *f,
+                                        struct dma_fence_cb *cb)
  {
        struct amdgpu_flip_work *work =
                container_of(cb, struct amdgpu_flip_work, cb);
@@ -46,8 +47,8 @@ static void amdgpu_flip_callback(struct dma_fence *f,
 struct dma_fence_cb *cb)
        schedule_work(&work->flip_work.work);
  }
  -static bool amdgpu_flip_handle_fence(struct amdgpu_flip_work *work,
-                                    struct dma_fence **f)
+static bool amdgpu_display_flip_handle_fence(struct amdgpu_flip_work
 *work,
+                                            struct dma_fence **f)
  {
        struct dma_fence *fence= *f;
  @@ -56,14 +57,15 @@ static bool amdgpu_flip_handle_fence(struct

amdgpu_flip_work *work,

        *f = NULL;

- if (!dma_fence_add_callback(fence, &work->cb,
amdgpu_flip_callback))

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +5 -1
+       if (!dma_fence_add_callback(fence, &work->cb,
+                                   amdgpu_display_flip_callback))
                return true;
        dma_fence_put(fence);
        return false;
  }
  -static void amdgpu_flip_work_func(struct work_struct *__work)
+static void amdgpu_display_flip_work_func(struct work_struct *__work)
  {
        struct delayed_work *delayed_work =
                container_of(__work, struct delayed_work, work);
@@ -77,11 +79,11 @@ static void amdgpu_flip_work_func(struct work_struct
 *__work)
        unsigned i;
        int vpos, hpos;
  -     if (amdgpu_flip_handle_fence(work, &work->excl))
+       if (amdgpu_display_flip_handle_fence(work, &work->excl))
                return;
        for (i = 0; i < work->shared_count; ++i)
-               if (amdgpu_flip_handle_fence(work, &work->shared[i]))
+               if (amdgpu_display_flip_handle_fence(work,
 &work->shared[i]))
                        return;
        /* Wait until we're out of the vertical blank period before the

one

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
@@ -118,7 +120,7 @@ static void amdgpu_flip_work_func(struct work_struct
 *__work)
  /*
   * Handle unpin events outside the interrupt handler proper.
   */
-static void amdgpu_unpin_work_func(struct work_struct *__work)
+static void amdgpu_display_unpin_work_func(struct work_struct *__work)
  {
        struct amdgpu_flip_work *work =
                container_of(__work, struct amdgpu_flip_work, unpin_work);
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +4 -2
@@ -163,8 +165,8 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc
 *crtc,
        if (work == NULL)
                return -ENOMEM;
  -     INIT_DELAYED_WORK(&work->flip_work, amdgpu_flip_work_func);
-       INIT_WORK(&work->unpin_work, amdgpu_unpin_work_func);
+       INIT_DELAYED_WORK(&work->flip_work,
 amdgpu_display_flip_work_func);
+       INIT_WORK(&work->unpin_work, amdgpu_display_unpin_work_func);
        work->event = event;
        work->adev = adev;
@@ -229,7 +231,7 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc
 *crtc,
        /* update crtc fb */
        crtc->primary->fb = fb;
        spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-       amdgpu_flip_work_func(&work->flip_work.work);
+       amdgpu_display_flip_work_func(&work->flip_work.work);
        return 0;
    pflip_cleanup:
@@ -480,7 +482,7 @@ bool amdgpu_ddc_probe(struct amdgpu_connector
 *amdgpu_connector,
        return true;
  }
  -static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb)
+static void amdgpu_display_user_framebuffer_destroy(struct
 drm_framebuffer *fb)
  {
        struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);
  @@ -489,9 +491,10 @@ static void amdgpu_user_framebuffer_destroy(struct

drm_framebuffer *fb)

        kfree(amdgpu_fb);

}
-static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer
*fb,
- struct drm_file
*file_priv,

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +4 -1
-                                                 unsigned int *handle)
+static int amdgpu_display_user_framebuffer_create_handle(
+                       struct drm_framebuffer *fb,
+                       struct drm_file *file_priv,
+                       unsigned int *handle)
  {
        struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb);
  @@ -499,8 +502,8 @@ static int

amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb,
}

    static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +2 -2
-       .destroy = amdgpu_user_framebuffer_destroy,
-       .create_handle = amdgpu_user_framebuffer_create_handle,
+       .destroy = amdgpu_display_user_framebuffer_destroy,
+       .create_handle = amdgpu_display_user_framebuffer_create_handle,
  };
    uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device

*adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -0
@@ -667,7 +670,7 @@ void amdgpu_update_display_priority(struct
 amdgpu_device *adev)
    }
  -static bool is_hdtv_mode(const struct drm_display_mode *mode)
+static bool amdgpu_display_is_hdtv_mode(const struct drm_display_mode
 *mode)
  {
        /* try and guess if this is a tv or a monitor */
        if ((mode->vdisplay == 480 && mode->hdisplay == 720) || /* 480p */
@@ -724,7 +727,7 @@ bool amdgpu_crtc_scaling_mode_fixup(struct drm_crtc
 *crtc,
                    ((amdgpu_encoder->underscan_type == UNDERSCAN_ON) ||
                     ((amdgpu_encoder->underscan_type == UNDERSCAN_AUTO)

&&

Quoted 13 lines
Quoted 7 lines

drm_detect_hdmi_monitor(amdgpu_connector_edid(connector)) &&

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
-                     is_hdtv_mode(mode)))) {
+                     amdgpu_display_is_hdtv_mode(mode)))) {
                        if (amdgpu_encoder->underscan_hborder != 0)
                                amdgpu_crtc->h_border =

amdgpu_encoder->underscan_hborder;
else

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx