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 CA077D3B7FB for ; Mon, 8 Dec 2025 18:27:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 547FF10E4C3; Mon, 8 Dec 2025 18:27:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="D9qAAztC"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id D2D5310E4B8; Mon, 8 Dec 2025 18:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1765218450; x=1796754450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3pZQLNeqXLPrkt/FWODdkFkGB3+eLgkOeyls4gV0DVc=; b=D9qAAztCsVdPd7LK/2mhArwKE95bMgEwBGJDZoqVvBKiteFGFuv02Jdq 4ciB7TnzVV+pmiUDKSrVZDIelMmkiPg71OZ7xwRwRmx9dUmhDe8teIfhP nW5fJQSe7eHhOC1A57+3VKdlvyFYRm9g0ZCtxdvcj8BFFCNzszU+WOKEp rCXDGDcJnmsUa0sTysCrUTAF/x0BEVDdStiK82KHc3HUvgJbG/sXkP3yT 4djgcJC6x/sULMfeNi/swZGLuIRG+5SrFzzhL+1SmYzmG9KP8wkoID0Nc eNwmccoNtzFCdB5uH9UW3FYL9YIeU9OT4yC0Zo3JiXki98Oi5dguD2tB8 g==; X-CSE-ConnectionGUID: QufbW9NPSvK69QEuZYfyFA== X-CSE-MsgGUID: ztmsMfL+QW6p0ZPfirqSqw== X-IronPort-AV: E=McAfee;i="6800,10657,11636"; a="67129553" X-IronPort-AV: E=Sophos;i="6.20,259,1758610800"; d="scan'208";a="67129553" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2025 10:27:29 -0800 X-CSE-ConnectionGUID: 2lpOmncaTKufLqp84y9aqw== X-CSE-MsgGUID: wEy9eJEFTkipN8LnqS0tHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.20,259,1758610800"; d="scan'208";a="196014488" Received: from rvuia-mobl.ger.corp.intel.com (HELO localhost) ([10.245.245.89]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2025 10:27:28 -0800 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org Subject: [PATCH 12/19] drm/i915/vga: Introduce intel_vga_{read,write}() Date: Mon, 8 Dec 2025 20:26:30 +0200 Message-ID: <20251208182637.334-13-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251208182637.334-1-ville.syrjala@linux.intel.com> References: <20251208182637.334-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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" From: Ville Syrjälä VGA register are rather special since they either get accessed via the global IO addresses, or possibly through MMIO on pre-g4x platforms. Wrap all VGA register accesses in intel_vga_{read,write}() to make it obvious where they get accessed. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_crt.c | 6 +++-- drivers/gpu/drm/i915/display/intel_crt_regs.h | 2 -- drivers/gpu/drm/i915/display/intel_vga.c | 27 +++++++++++++++---- drivers/gpu/drm/i915/display/intel_vga.h | 3 +++ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c index 5f9a03877ea9..dedc26f6a2b2 100644 --- a/drivers/gpu/drm/i915/display/intel_crt.c +++ b/drivers/gpu/drm/i915/display/intel_crt.c @@ -33,6 +33,7 @@ #include #include #include +#include