From patchwork Wed Dec 18 17:36:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13914000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3656CE77187 for ; Wed, 18 Dec 2024 17:39:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C6E8810E343; Wed, 18 Dec 2024 17:39:21 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="G1Q6Dis9"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id C32D710EC1F for ; Wed, 18 Dec 2024 17:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734543561; x=1766079561; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ez7N0N7o3+6nJ01R9Qy8bDgSgFFvG3YGEb0iqpDyb+E=; b=G1Q6Dis9vflbGMY3NWL2thCdPk+xokPKmcmnWMPwClCTE2a174KNZNUA rPOoPoxSdVIHBs1OH/feLWwmxVufo+azPVCgiB81OG1Qmz7dUQel+wd1M fhHqRVEy6yHOjBKmcrVoDQZkIgqM0Ed5YRkeWvm+0YoNzM8qOvx+/EPV3 6P235q+JXkslyljBc+Fp2wyQ/fPIkCNbWkBCZ6JFQMz5jhc53aPk4hRc2 UfTZqJ3NA1MxMHlkZ39oCU9Immnden12LOeIvXkh9G5wX/ZykqspdxoYf h1vQOfUkmOSHwg/7/qBnHZJ92rRFXWHSyW7O+7nkknIAh317ic6pN8+Uq g==; X-CSE-ConnectionGUID: xIQNt6JAQeKWZ1cjmoEDtQ== X-CSE-MsgGUID: JtuuZ7A8Sl6kf7ZSr5vDLw== X-IronPort-AV: E=McAfee;i="6700,10204,11290"; a="22619207" X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="22619207" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2024 09:36:56 -0800 X-CSE-ConnectionGUID: mBv1F+0RQKaKPDl6uUu7OA== X-CSE-MsgGUID: Q4aapQR6Qnm7fSF9U8fx0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="98165369" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 18 Dec 2024 09:36:54 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 18 Dec 2024 19:36:53 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: stable@vger.kernel.org Subject: [PATCH 1/4] drm/i915: Drop 64bpp YUV formats from ICL+ SDR planes Date: Wed, 18 Dec 2024 19:36:47 +0200 Message-ID: <20241218173650.19782-2-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218173650.19782-1-ville.syrjala@linux.intel.com> References: <20241218173650.19782-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä I'm seeing underruns with these 64bpp YUV formats on TGL. The weird details: - only happens on pipe B/C/D SDR planes, pipe A SDR planes seem fine, as do all HDR planes - somehow CDCLK related, higher CDCLK allows for bigger plane with these formats without underruns. With 300MHz CDCLK I can only go up to 1200 pixels wide or so, with 650MHz even a 3840 pixel wide plane was OK - ICL and ADL so far appear unaffected So not really sure what's the deal with this, but bspec does state "64-bit formats supported only on the HDR planes" so let's just drop these formats from the SDR planes. We already disallow 64bpp RGB formats. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/skl_universal_plane.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c index ff9764cac1e7..80e558042d97 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -106,8 +106,6 @@ static const u32 icl_sdr_y_plane_formats[] = { DRM_FORMAT_Y216, DRM_FORMAT_XYUV8888, DRM_FORMAT_XVYU2101010, - DRM_FORMAT_XVYU12_16161616, - DRM_FORMAT_XVYU16161616, }; static const u32 icl_sdr_uv_plane_formats[] = { @@ -134,8 +132,6 @@ static const u32 icl_sdr_uv_plane_formats[] = { DRM_FORMAT_Y216, DRM_FORMAT_XYUV8888, DRM_FORMAT_XVYU2101010, - DRM_FORMAT_XVYU12_16161616, - DRM_FORMAT_XVYU16161616, }; static const u32 icl_hdr_plane_formats[] = { From patchwork Wed Dec 18 17:36:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13914001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B025E77187 for ; Wed, 18 Dec 2024 17:39:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9FCB10EC1F; Wed, 18 Dec 2024 17:39:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="THYK/sz+"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id A4C6910EC1F for ; Wed, 18 Dec 2024 17:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734543568; x=1766079568; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=Lif2WOy/WIH0XRJBwulXxnzNIp+Ps7e9jySEb7K+JJo=; b=THYK/sz+iYO+qMrRBfdj0L4pooF5GrnyQGEYTBEaFJFUmB2N/mmJLVVW tjbgQ6mCM4Y5vnBoGH/p3ZaRrqwufR1qskX3cwTqmJC8PVv7buLrrHmag JV4j/sRUYD8iI7gLa7uxOcxnGhMEyC5YySv1H3ieovQKdWevdXq8rT417 o+NeLRBo8WrP9Mge/+vADI4a77Dok1i7Bi470H7BAxE9qMwKXctWhfh46 bXnMn2K5FIf0E4SugTn2XuSq11BgbJsMBr4KxTlmept9hcS3c7KiZl7Ce mOQ4DAnRF2zJWs9LEi8lwpDFDlGGM8dLR0PzLcmb7mPijv29lZ2e6WSE4 Q==; X-CSE-ConnectionGUID: CZUGsTuxQz+na8QOpxPrng== X-CSE-MsgGUID: GRmcuCwLRIGbDCpb0B7feQ== X-IronPort-AV: E=McAfee;i="6700,10204,11290"; a="22619249" X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="22619249" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2024 09:36:59 -0800 X-CSE-ConnectionGUID: Ois04raGTTGhv57qHeIRbQ== X-CSE-MsgGUID: n+UJomlOSNun45A/ZGYdFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="98165382" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 18 Dec 2024 09:36:57 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 18 Dec 2024 19:36:56 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 2/4] drm/i915: Drop the extra "plane" from tracpoints Date: Wed, 18 Dec 2024 19:36:48 +0200 Message-ID: <20241218173650.19782-3-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218173650.19782-1-ville.syrjala@linux.intel.com> References: <20241218173650.19782-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Out plane names already include the "plane" part (or "primary","sprite","cursor" in some cases). Don't duplicate that in the tracpoints as that leadst to weird stuff like "plane plane 1A". Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display_trace.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h index 338b9f7b20b8..6a9963701423 100644 --- a/drivers/gpu/drm/i915/display/intel_display_trace.h +++ b/drivers/gpu/drm/i915/display/intel_display_trace.h @@ -397,7 +397,7 @@ TRACE_EVENT(intel_plane_async_flip, __entry->async_flip = async_flip; ), - TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u, async_flip=%s", + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, async_flip=%s", __get_str(dev), __entry->pipe_name, __get_str(name), __entry->frame, __entry->scanline, str_yes_no(__entry->async_flip)) ); @@ -426,7 +426,7 @@ TRACE_EVENT(intel_plane_update_noarm, memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst)); ), - TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, __get_str(dev), __entry->pipe_name, __get_str(name), __entry->frame, __entry->scanline, DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), @@ -457,7 +457,7 @@ TRACE_EVENT(intel_plane_update_arm, memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst)); ), - TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, __get_str(dev), __entry->pipe_name, __get_str(name), __entry->frame, __entry->scanline, DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), @@ -484,7 +484,7 @@ TRACE_EVENT(intel_plane_disable_arm, __entry->scanline = intel_get_crtc_scanline(crtc); ), - TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u", + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u", __get_str(dev), __entry->pipe_name, __get_str(name), __entry->frame, __entry->scanline) ); @@ -512,7 +512,7 @@ TRACE_EVENT(intel_fbc_activate, __entry->scanline = intel_get_crtc_scanline(crtc); ), - TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u", + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u", __get_str(dev), __entry->pipe_name, __get_str(name), __entry->frame, __entry->scanline) ); @@ -540,7 +540,7 @@ TRACE_EVENT(intel_fbc_deactivate, __entry->scanline = intel_get_crtc_scanline(crtc); ), - TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u", + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u", __get_str(dev), __entry->pipe_name, __get_str(name), __entry->frame, __entry->scanline) ); @@ -568,7 +568,7 @@ TRACE_EVENT(intel_fbc_nuke, __entry->scanline = intel_get_crtc_scanline(crtc); ), - TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u", + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u", __get_str(dev), __entry->pipe_name, __get_str(name), __entry->frame, __entry->scanline) ); From patchwork Wed Dec 18 17:36:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13914002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5249BE77187 for ; Wed, 18 Dec 2024 17:39:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 014D810EC2B; Wed, 18 Dec 2024 17:39:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IgK736Jl"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id E0CD810EC2B for ; Wed, 18 Dec 2024 17:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734543583; x=1766079583; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=aAYwX3nxgLBvlI7XHDtpfaoGLzeF56sUAscEE2nj4RY=; b=IgK736JloUyNOJKbiE5YXmC9TRUxLQRu5oyEVcrehuZJQ9kfXITltLVW wAxllnZKs4Gajccwy/HCdENS1PbVBQbb7kBZlIC5P1GWctdrNwxnspIbw trHcut1zPOOixFsNEYKcyzUXQiqE60PVuWnmijG7aNGDSlXWbmJymP1z5 SWDb+DefTq3V2tOeyDHjz8gvesoLrwwrwm1huEA6607IU+Cos1GrbCLFH 1PJooEJa1UZp02q2RU3xO7U547a0qL0t0meDNmTPzsm55UpBfFT9B1exT ZUxclhFujT9EcMQx/EmRFOe2Duxq4k1uoGgYt1xCF5JBFq3dy2XHsiZzN g==; X-CSE-ConnectionGUID: OrraDCNwSrmWd7/acReraQ== X-CSE-MsgGUID: LzcOTArzRrmeenozkO6T9g== X-IronPort-AV: E=McAfee;i="6700,10204,11290"; a="22619291" X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="22619291" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2024 09:37:02 -0800 X-CSE-ConnectionGUID: PD+UhuDsQ1qkwIw6cELtwQ== X-CSE-MsgGUID: GjW7G5jETP+4ysJ2yG2AyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="98165397" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 18 Dec 2024 09:37:00 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 18 Dec 2024 19:36:59 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 3/4] drm/i915: Pass the plane state explicitly to tracpoints Date: Wed, 18 Dec 2024 19:36:49 +0200 Message-ID: <20241218173650.19782-4-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218173650.19782-1-ville.syrjala@linux.intel.com> References: <20241218173650.19782-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Using the plane->state pointer in the tracepoints is incorrect as technically a different state could already have been swapped in (though in reality that is currently prevented by the stall hacks in the commit machinery). But let's not leave such footguns lying around when we can just pass in the correct state by hand. Signed-off-by: Ville Syrjälä --- .../gpu/drm/i915/display/intel_atomic_plane.c | 4 +-- .../drm/i915/display/intel_display_trace.h | 25 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index 612e9b0ec14a..c6af77491069 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -767,7 +767,7 @@ void intel_plane_update_noarm(struct intel_dsb *dsb, { struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); - trace_intel_plane_update_noarm(plane, crtc); + trace_intel_plane_update_noarm(plane_state, crtc); if (plane->update_noarm) plane->update_noarm(dsb, plane, crtc_state, plane_state); @@ -797,7 +797,7 @@ void intel_plane_update_arm(struct intel_dsb *dsb, return; } - trace_intel_plane_update_arm(plane, crtc); + trace_intel_plane_update_arm(plane_state, crtc); plane->update_arm(dsb, plane, crtc_state, plane_state); } diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h index 6a9963701423..f63ce022e2d4 100644 --- a/drivers/gpu/drm/i915/display/intel_display_trace.h +++ b/drivers/gpu/drm/i915/display/intel_display_trace.h @@ -21,6 +21,7 @@ #include "intel_vblank.h" #define __dev_name_display(display) dev_name((display)->drm->dev) +#define __dev_name_drm(obj) dev_name((obj)->dev->dev) #define __dev_name_kms(obj) dev_name((obj)->base.dev->dev) /* @@ -403,17 +404,17 @@ TRACE_EVENT(intel_plane_async_flip, ); TRACE_EVENT(intel_plane_update_noarm, - TP_PROTO(struct intel_plane *plane, struct intel_crtc *crtc), - TP_ARGS(plane, crtc), + TP_PROTO(const struct intel_plane_state *plane_state, struct intel_crtc *crtc), + TP_ARGS(plane_state, crtc), TP_STRUCT__entry( - __string(dev, __dev_name_kms(plane)) + __string(dev, __dev_name_drm(plane_state->uapi.plane)) __field(char, pipe_name) __field(u32, frame) __field(u32, scanline) __array(int, src, 4) __array(int, dst, 4) - __string(name, plane->base.name) + __string(name, plane_state->uapi.plane->name) ), TP_fast_assign( @@ -422,8 +423,8 @@ TRACE_EVENT(intel_plane_update_noarm, __entry->pipe_name = pipe_name(crtc->pipe); __entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->scanline = intel_get_crtc_scanline(crtc); - memcpy(__entry->src, &plane->base.state->src, sizeof(__entry->src)); - memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst)); + memcpy(__entry->src, &plane_state->uapi.src, sizeof(__entry->src)); + memcpy(__entry->dst, &plane_state->uapi.dst, sizeof(__entry->dst)); ), TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, @@ -434,17 +435,17 @@ TRACE_EVENT(intel_plane_update_noarm, ); TRACE_EVENT(intel_plane_update_arm, - TP_PROTO(struct intel_plane *plane, struct intel_crtc *crtc), - TP_ARGS(plane, crtc), + TP_PROTO(const struct intel_plane_state *plane_state, struct intel_crtc *crtc), + TP_ARGS(plane_state, crtc), TP_STRUCT__entry( - __string(dev, __dev_name_kms(plane)) + __string(dev, __dev_name_drm(plane_state->uapi.plane)) __field(char, pipe_name) __field(u32, frame) __field(u32, scanline) __array(int, src, 4) __array(int, dst, 4) - __string(name, plane->base.name) + __string(name, plane_state->uapi.plane->name) ), TP_fast_assign( @@ -453,8 +454,8 @@ TRACE_EVENT(intel_plane_update_arm, __entry->pipe_name = pipe_name(crtc->pipe); __entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->scanline = intel_get_crtc_scanline(crtc); - memcpy(__entry->src, &plane->base.state->src, sizeof(__entry->src)); - memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst)); + memcpy(__entry->src, &plane_state->uapi.src, sizeof(__entry->src)); + memcpy(__entry->dst, &plane_state->uapi.dst, sizeof(__entry->dst)); ), TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, From patchwork Wed Dec 18 17:36:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 13914003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA76CE7718A for ; Wed, 18 Dec 2024 17:39:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B4E510EC37; Wed, 18 Dec 2024 17:39:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="PdiXz6rU"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E14810EC37 for ; Wed, 18 Dec 2024 17:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1734543595; x=1766079595; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=e2TB05ZH44548XkgvrQ34zvyOn98XMIO30mE0abuHnI=; b=PdiXz6rUbHH6j838MwnYp8jbhtC+XwqImrjc0Au0R42b9yPa3w87BMH6 yze+kPD49etpuJBQNwKJ0mKBpJgSkyZANbVQoQQ4g7B0SoTbGzrf3nEz8 lOLekkJxHU15dM0djQgCigemL1z2D3vmyX/3/wa2/qAZODSh7qH65nnYE lqjbXH37/yQk1/XURBOx/8kBk+4Xx+QVQ6vINGbrtxjXhrEEwcXbJuklX qLcDEYc0RWcsUTn+GQ8bxg0blrfIYZCvZxzYb8WFszGLcKf+Zcm9MCCM0 KDMoJjIx2IV5sKVf7P17P9iiXO6q2MJEMjKWvUMLlblCuW4ztQ48nZK8+ g==; X-CSE-ConnectionGUID: 2/VEHxzHS9OEkWYA6rsVoA== X-CSE-MsgGUID: RQP7RAHwQ/uZFpPQvykcCQ== X-IronPort-AV: E=McAfee;i="6700,10204,11290"; a="22619335" X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="22619335" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2024 09:37:05 -0800 X-CSE-ConnectionGUID: Lv0WD79+TnudORLD8ZYEqQ== X-CSE-MsgGUID: DVWtTytRTA6CTBObmA1ukg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,245,1728975600"; d="scan'208";a="98165407" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.74]) by fmviesa008.fm.intel.com with SMTP; 18 Dec 2024 09:37:03 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 18 Dec 2024 19:37:02 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Subject: [PATCH 4/4] drm/i915: Include pixel format in plane tracpoints Date: Wed, 18 Dec 2024 19:36:50 +0200 Message-ID: <20241218173650.19782-5-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241218173650.19782-1-ville.syrjala@linux.intel.com> References: <20241218173650.19782-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä Make debugging a bit easier by including the pixel format in the plane tracpoints. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display_trace.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h index f63ce022e2d4..bd07da0743f8 100644 --- a/drivers/gpu/drm/i915/display/intel_display_trace.h +++ b/drivers/gpu/drm/i915/display/intel_display_trace.h @@ -412,6 +412,7 @@ TRACE_EVENT(intel_plane_update_noarm, __field(char, pipe_name) __field(u32, frame) __field(u32, scanline) + __field(u32, format) __array(int, src, 4) __array(int, dst, 4) __string(name, plane_state->uapi.plane->name) @@ -423,13 +424,14 @@ TRACE_EVENT(intel_plane_update_noarm, __entry->pipe_name = pipe_name(crtc->pipe); __entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->scanline = intel_get_crtc_scanline(crtc); + __entry->format = plane_state->hw.fb->format->format; memcpy(__entry->src, &plane_state->uapi.src, sizeof(__entry->src)); memcpy(__entry->dst, &plane_state->uapi.dst, sizeof(__entry->dst)); ), - TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, format=%p4cc, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, __get_str(dev), __entry->pipe_name, __get_str(name), - __entry->frame, __entry->scanline, + __entry->frame, __entry->scanline, &__entry->format, DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) ); @@ -443,6 +445,7 @@ TRACE_EVENT(intel_plane_update_arm, __field(char, pipe_name) __field(u32, frame) __field(u32, scanline) + __field(u32, format) __array(int, src, 4) __array(int, dst, 4) __string(name, plane_state->uapi.plane->name) @@ -454,13 +457,14 @@ TRACE_EVENT(intel_plane_update_arm, __entry->pipe_name = pipe_name(crtc->pipe); __entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->scanline = intel_get_crtc_scanline(crtc); + __entry->format = plane_state->hw.fb->format->format; memcpy(__entry->src, &plane_state->uapi.src, sizeof(__entry->src)); memcpy(__entry->dst, &plane_state->uapi.dst, sizeof(__entry->dst)); ), - TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, format=%p4cc, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, __get_str(dev), __entry->pipe_name, __get_str(name), - __entry->frame, __entry->scanline, + __entry->frame, __entry->scanline, &__entry->format, DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) );