From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com,
Ankit Nautiyal <ankit.k.nautiyal@intel.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH v2 10/13] drm/i915/lvds: switch to drm_edid_read_switcheroo()
Date: Tue, 30 May 2023 12:08:22 +0300 [thread overview]
Message-ID: <429cd6f23366cb4cace4fa13cf92ad068aca64dd.1685437501.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1685437500.git.jani.nikula@intel.com>
Use drm_edid_read_switcheroo() to switch from struct edid to struct
drm_edid.
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_lvds.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
index 1f4349a12a02..3ace56979b70 100644
--- a/drivers/gpu/drm/i915/display/intel_lvds.c
+++ b/drivers/gpu/drm/i915/display/intel_lvds.c
@@ -944,17 +944,8 @@ void intel_lvds_init(struct drm_i915_private *i915)
*/
mutex_lock(&i915->drm.mode_config.mutex);
if (vga_switcheroo_handler_flags() & VGA_SWITCHEROO_CAN_SWITCH_DDC) {
- const struct edid *edid;
-
- /* FIXME: Make drm_get_edid_switcheroo() return drm_edid */
- edid = drm_get_edid_switcheroo(&connector->base,
- intel_gmbus_get_adapter(i915, pin));
- if (edid) {
- drm_edid = drm_edid_alloc(edid, (edid->extensions + 1) * EDID_LENGTH);
- kfree(edid);
- } else {
- drm_edid = NULL;
- }
+ drm_edid = drm_edid_read_switcheroo(&connector->base,
+ intel_gmbus_get_adapter(i915, pin));
} else {
drm_edid = drm_edid_read_ddc(&connector->base,
intel_gmbus_get_adapter(i915, pin));
--
2.39.2
next prev parent reply other threads:[~2023-05-30 9:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 9:08 [PATCH v2 00/13] drm/display & drm/i915: more struct drm_edid conversions Jani Nikula
2023-05-30 9:08 ` [PATCH v2 01/13] drm/edid: parse display info has_audio similar to is_hdmi Jani Nikula
2023-05-30 9:08 ` [PATCH v2 02/13] drm/display/dp_mst: drop has_audio from struct drm_dp_mst_port Jani Nikula
2023-05-30 9:08 ` [PATCH v2 03/13] drm/i915/dp: stop caching has_audio in struct intel_dp Jani Nikula
2023-05-30 9:08 ` [PATCH v2 04/13] drm/i915/dp: stop caching has_hdmi_sink " Jani Nikula
2023-05-30 9:08 ` [PATCH v2 05/13] drm/i915/hdmi: stop caching has_audio in struct intel_hdmi Jani Nikula
2023-05-30 9:08 ` [PATCH v2 06/13] drm/i915/hdmi: stop caching has_hdmi_sink " Jani Nikula
2023-05-30 9:08 ` [PATCH v2 07/13] drm/i915/sdvo: stop caching has_hdmi_monitor in struct intel_sdvo Jani Nikula
2023-05-30 9:08 ` [PATCH v2 08/13] drm/i915/sdvo: stop caching has_hdmi_audio " Jani Nikula
2023-05-30 9:08 ` [PATCH v2 09/13] drm/edid: add drm_edid_read_switcheroo() Jani Nikula
2023-05-30 9:08 ` Jani Nikula [this message]
2023-05-30 9:08 ` [PATCH v2 11/13] drm/edid: make drm_edid_duplicate() safe to call with NULL parameter Jani Nikula
2023-05-30 9:08 ` [PATCH v2 12/13] drm/display/dp_mst: convert to struct drm_edid Jani Nikula
2023-05-30 9:08 ` [PATCH v2 13/13] drm/i915/display: switch the rest of the connectors " Jani Nikula
2023-05-31 15:12 ` [PATCH v2 00/13] drm/display & drm/i915: more struct drm_edid conversions Jani Nikula
2023-06-02 11:50 ` [Intel-gfx] " Jani Nikula
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=429cd6f23366cb4cace4fa13cf92ad068aca64dd.1685437501.git.jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/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