diff mbox series

drm/i915/display: Print usefull information on error

Message ID 20230601051503.175869-1-arun.r.murthy@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: Print usefull information on error | expand

Commit Message

Murthy, Arun R June 1, 2023, 5:15 a.m. UTC
For modifier not supporting async flip, print the modifier and display
version. Helps in reading the error message.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Jani Nikula June 1, 2023, 9:41 a.m. UTC | #1
On Thu, 01 Jun 2023, Arun R Murthy <arun.r.murthy@intel.com> wrote:
> For modifier not supporting async flip, print the modifier and display
> version. Helps in reading the error message.
>
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index f51a55f4e9d0..0877f1e251a0 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -6012,8 +6012,9 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
>  			 */
>  			if (DISPLAY_VER(i915) < 12) {
>  				drm_dbg_kms(&i915->drm,
> -					    "[PLANE:%d:%s] Modifier does not support async flips\n",
> -					    plane->base.base.id, plane->base.name);
> +					    "[PLANE:%d:%s] Asyn flip on modifier 0x%llx not supported on Display Ver %d\n",

How about:

"Modifier 0x%llx does not support async flips on display ver %d\n"

> +					    plane->base.base.id, plane->base.name,
> +					    new_plane_state->hw.fb->modifier, DISPLAY_VER(i915));
>  				return -EINVAL;
>  			}
>  			break;
> @@ -6025,8 +6026,9 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
>  			break;
>  		default:
>  			drm_dbg_kms(&i915->drm,
> -				    "[PLANE:%d:%s] Modifier does not support async flips\n",
> -				    plane->base.base.id, plane->base.name);
> +				    "[PLANE:%d:%s] Unknown modifier 0x%llx ! async flip not supported\n",

It's not unknown, it just doesn't support async flips? Why the
exclamation mark?

How about:

"Modifier 0x%llx does not support async flips\n"

> +				    plane->base.base.id, plane->base.name,
> +				    new_plane_state->hw.fb->modifier);
>  			return -EINVAL;
>  		}
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index f51a55f4e9d0..0877f1e251a0 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6012,8 +6012,9 @@  static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
 			 */
 			if (DISPLAY_VER(i915) < 12) {
 				drm_dbg_kms(&i915->drm,
-					    "[PLANE:%d:%s] Modifier does not support async flips\n",
-					    plane->base.base.id, plane->base.name);
+					    "[PLANE:%d:%s] Asyn flip on modifier 0x%llx not supported on Display Ver %d\n",
+					    plane->base.base.id, plane->base.name,
+					    new_plane_state->hw.fb->modifier, DISPLAY_VER(i915));
 				return -EINVAL;
 			}
 			break;
@@ -6025,8 +6026,9 @@  static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
 			break;
 		default:
 			drm_dbg_kms(&i915->drm,
-				    "[PLANE:%d:%s] Modifier does not support async flips\n",
-				    plane->base.base.id, plane->base.name);
+				    "[PLANE:%d:%s] Unknown modifier 0x%llx ! async flip not supported\n",
+				    plane->base.base.id, plane->base.name,
+				    new_plane_state->hw.fb->modifier);
 			return -EINVAL;
 		}