From mboxrd@z Thu Jan 1 00:00:00 1970 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 D6C4FD68BF0 for ; Thu, 18 Dec 2025 08:35:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D99810E730; Thu, 18 Dec 2025 08:35:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="dVYbE204"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B4FF10E730; Thu, 18 Dec 2025 08:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1766046930; x=1797582930; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=92W6jN8/o0iLPg0WuYs1cNn0G96rLR7ZA14oq6QjV+M=; b=dVYbE204Eg1qZOmosVmDSDlYou9xlk2ACQu0rnpY4pyUxDRv3cFHtChE sH9xSmQfx75tuufrv/Yaw120lUOnUuakvTUHjsPXul5divdX93A0qwnt5 HGdFBNDrQ59rL1/3pPQa4cHeUXKM6TgpBtvGS1G53AftG3PNWEX4R1U1o u4RsjgFSWuFYcg/cB45ZYzuvpv0x46BzRHaHdEHD0bupg8CAKiWO6dmlT tF3BVrWi0GD8X8N0X5rm1vHNH5MTJLNVU6yxtexri4ZguMEwZIEHJwozU rYChL8M/RDEXYXVJIqF9awY+ooli4ppZ8mcFaEvcbcXxDaFHNLrL6Anvy w==; X-CSE-ConnectionGUID: DPQWPTTJQBySuCWZdSglMg== X-CSE-MsgGUID: Y6cM0hPyRImVeL+/WrOyvA== X-IronPort-AV: E=McAfee;i="6800,10657,11645"; a="79365801" X-IronPort-AV: E=Sophos;i="6.21,158,1763452800"; d="scan'208";a="79365801" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2025 00:35:30 -0800 X-CSE-ConnectionGUID: kTl6vDOoTkiR8nLKYjPVrg== X-CSE-MsgGUID: XMB8vonhSyKWfsQ10DTpBQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,158,1763452800"; d="scan'208";a="203597768" Received: from srr4-3-linux-103-aknautiy.iind.intel.com ([10.223.34.160]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2025 00:35:28 -0800 From: Ankit Nautiyal To: intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: jani.nikula@linux.intel.com, Ankit Nautiyal Subject: [PATCH 4/7] drm/i915/gvt/display_helpers: Cast argument to enum pipe for pipe-offset macro Date: Thu, 18 Dec 2025 13:52:57 +0530 Message-ID: <20251218082302.2327243-5-ankit.k.nautiyal@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251218082302.2327243-1-ankit.k.nautiyal@intel.com> References: <20251218082302.2327243-1-ankit.k.nautiyal@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" TRANSCONF() expands via _MMIO_PIPE2, i.e., it uses pipe-based addressing. In GVT, some call sites pass an enum transcoder to TRANSCONF(), which now routes through INTEL_DISPLAY_DEVICE_PIPE_OFFSET() and ultimately calls intel_display_device_pipe_offset(), whose parameter type is enum pipe. This results in -Werror=enum-conversion. To address this, cast the index to enum pipe in the GVT-side macro override. This works for all cases as TRANSCODER_{A,B,C,D} all have 1:1 mapping to PIPE_{A,B,C,D} except for TRANSCODER_EDP. There is one place which uses TRANSCONF() with TRANSCODER_EDP, which appears to be incorrect. In any case, the cast preserves the previous behaviour. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/gvt/display_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/display_helpers.h b/drivers/gpu/drm/i915/gvt/display_helpers.h index 97ebc92768fc..3af878e3d78e 100644 --- a/drivers/gpu/drm/i915/gvt/display_helpers.h +++ b/drivers/gpu/drm/i915/gvt/display_helpers.h @@ -17,8 +17,8 @@ #ifdef INTEL_DISPLAY_DEVICE_PIPE_OFFSET #undef INTEL_DISPLAY_DEVICE_PIPE_OFFSET #endif -#define INTEL_DISPLAY_DEVICE_PIPE_OFFSET(display, pipe) \ - intel_display_device_pipe_offset((display), (pipe)) +#define INTEL_DISPLAY_DEVICE_PIPE_OFFSET(display, idx) \ + intel_display_device_pipe_offset((display), (enum pipe)(idx)) #ifdef INTEL_DISPLAY_DEVICE_TRANS_OFFSET #undef INTEL_DISPLAY_DEVICE_TRANS_OFFSET -- 2.45.2