From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385004; b=dKubTyN0SG7LzAJrfTqxTH1YgvKvlIxKSgvC7dKQKIRuDnYS/uA8fcn860GHNi3MoEoA P5r7HDBOyPXW+b3WGCjTDiCOY+jEgM7sMZW+P46UVedbo1dFuDX+NkD+GZne73Y7GCYmS Rput+BEmHdgDn0YoTjvVBVMmUGodNYib1BuVAcZDYtfy6MetxzhLr9eayfF4Z/gyvk/fR CAayI2urNeO3ODBTcq6K0BjO7EvSdjqIv0cX5zaYUwqTzdcWM25Ox/er0g5IA6uGEJrdq 5tzyvlbJ+jb9EbpR645bDzeKUkHUfy0Ccx/3Xw/QjiML/mjxS+JRm9RObnDOTNenoJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385004; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=ZulI4Dkm7guAbZKcif1JFYFT3fXvzoC/1HbG0JM2Rjs=; b=AdXVj9JuQ4MisMS6VX4lir384yrfhOHvg8GMCYbThLR8AKTxJ8B49ESSQNmX8snSoOGM gfY7m4jVRQd6PPaTcEpVq+d+zIKB7nEwHglLaeNvsmgfO5DdGjRAug9pq2P5SimcdNX1B t8Inpm5nFnIu0fcCWGDgjwZ4olncFAwhHtD1hcDgg9rQ2cRSxWMTsCA0mzw7k6UvUPHqG 7lbCA1V5P/Nos9UU/BalPBll3lYMD0Fet3rxW8tUd4eTF3eHw1Jsvhh4DI5F195P1y9jZ agvqLHsCBPm5r4wUDbyNC3Wjb1OIxMo0MFAY9LvOVe6Ckm0uw2n7t7GybYk3s1cUY3w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1F42S8qZ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33705606A333; Fri, 4 Dec 2026 11:50:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1F42S8qZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8909D1F000C2; Fri, 4 Dec 2026 11:50:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385003; bh=ZulI4Dkm7guAbZKcif1JFYFT3fXvzoC/1HbG0JM2Rjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=1F42S8qZa6CIelPk6uT22jWBd4wRw/F9IT4yEhwwmAy4sC7JfMR6R1dCDTrDSbqtU 13CO2M16fN7cwGx9YKefVLHM2o0KvHu47kwxw3lXVFZQYNWTsVJNiOkMHkNALlI13M Mj8gZtqtFAnrU1N43741ZM84Fz+4RLA8g9cAPBS0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Melissa Wen , Dan Wheeler , Roman Li , Alex Deucher , Sasha Levin Subject: [PATCH 6.6 0381/1167] drm/amd/display: copy function name into dcn_optc_lock_unlock_state trace event Date: Fri, 4 Dec 2026 18:56:48 +0900 Message-ID: <20261204100711.927716710@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Melissa Wen [ Upstream commit 624a5a158c2a49f07edba7f8653eeecca114921f ] Userspace trace tools that use libtraceevent to read binary buffer only see a kernel address when printing const char *. Use string macros in dcn_optc_lock_unlock_state to copy the function name into the trace event. Fixes: f1943a51f0f9 ("drm/amd/display: Add events log to trace OPTC lock and unlock") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Melissa Wen Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher [ sashal: Changed __assign_str(function); to the two-argument __assign_str(function, function);, since this tree's macro takes a destination and a source. ] Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h index 8b2f8c50eb934..4d471461b86cc 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_trace.h @@ -660,7 +660,7 @@ TRACE_EVENT(dcn_optc_lock_unlock_state, TP_ARGS(optc_state, instance, lock, function, line), TP_STRUCT__entry( - __field(const char *, function) + __string(function, function) __field(int, instance) __field(bool, lock) __field(int, line) @@ -678,7 +678,7 @@ TRACE_EVENT(dcn_optc_lock_unlock_state, __field(int, vready_offset) ), TP_fast_assign( - __entry->function = function; + __assign_str(function, function); __entry->instance = instance; __entry->lock = lock; __entry->line = line; @@ -700,7 +700,7 @@ TRACE_EVENT(dcn_optc_lock_unlock_state, "min_v_blank_interlace=%d vstartup_start=%d vupdate_offset=%d vupdate_width=%d " "vready_offset=%d", __entry->lock ? "Lock" : "Unlock", - __entry->function, + __get_str(function), __entry->line, __entry->instance, __entry->opp_count, -- 2.53.0