From: Uma Shankar <uma.shankar@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-xe] [PATCH 3/3] drm/i915: Use the wrapper function for vga decode setup
Date: Mon, 18 Sep 2023 23:07:11 +0530 [thread overview]
Message-ID: <20230918173711.625930-4-uma.shankar@intel.com> (raw)
In-Reply-To: <20230918173711.625930-1-uma.shankar@intel.com>
Some of the VGA functionality is not needed by the proposed
Intel Xe driver. A wrapper function for VGA decode setup, this
patch uses the same.
This fixes
commit b9e2d240d489 ("FIXME: drm/i915/vga: disable vga set decode for xe")
Reverts the changes added in the patch.
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
drivers/gpu/drm/i915/display/intel_vga.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
index 42da1a038042..145fb184b0df 100644
--- a/drivers/gpu/drm/i915/display/intel_vga.c
+++ b/drivers/gpu/drm/i915/display/intel_vga.c
@@ -99,24 +99,6 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
vga_put(pdev, VGA_RSRC_LEGACY_IO);
}
-static unsigned int
-intel_vga_set_decode(struct pci_dev *pdev, bool enable_decode)
-{
-#ifdef I915
- struct drm_i915_private *i915 = pdev_to_i915(pdev);
-
- intel_gmch_vga_set_state(i915, enable_decode);
-
- if (enable_decode)
- return VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM |
- VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM;
- else
- return VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM;
-#else
- return -EIO;
-#endif
-}
-
int intel_vga_register(struct drm_i915_private *i915)
{
@@ -131,7 +113,7 @@ int intel_vga_register(struct drm_i915_private *i915)
* then we do not take part in VGA arbitration and the
* vga_client_register() fails with -ENODEV.
*/
- ret = vga_client_register(pdev, intel_vga_set_decode);
+ ret = vga_client_register(pdev, intel_gmch_vga_set_decode);
if (ret && ret != -ENODEV)
return ret;
--
2.42.0
next prev parent reply other threads:[~2023-09-18 17:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 17:37 [Intel-xe] [PATCH 0/3] drm/xe: Make vga setup decode co-exist with Xe Uma Shankar
2023-09-18 17:37 ` [Intel-xe] [PATCH 1/3] drm/i915/display: Add a wrapper function for vga decode setup Uma Shankar
2023-09-19 10:26 ` Jani Nikula
2023-09-20 9:27 ` Shankar, Uma
2023-09-18 17:37 ` [Intel-xe] [PATCH 2/3] drm/xe: Add wrapper function for VGA " Uma Shankar
2023-09-19 10:30 ` Jani Nikula
2023-09-20 9:33 ` Shankar, Uma
2023-09-20 10:08 ` Jani Nikula
2023-09-20 12:39 ` Shankar, Uma
2023-09-21 12:00 ` Shankar, Uma
2023-09-21 12:18 ` Ville Syrjälä
2023-09-21 20:14 ` Shankar, Uma
2023-09-18 17:37 ` Uma Shankar [this message]
2023-09-18 18:10 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Make vga setup decode co-exist with Xe Patchwork
2023-09-18 18:11 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-18 18:12 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-18 18:15 ` [Intel-xe] ✗ CI.Build: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230918173711.625930-4-uma.shankar@intel.com \
--to=uma.shankar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox