lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1389106472-11389-5-git-send-email-artagnon@gmail.com>
Date:	Tue,  7 Jan 2014 20:24:32 +0530
From:	Ramkumar Ramachandra <artagnon@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Chris Wilson <chris@...is-wilson.co.uk>,
	Andreas Heider <andreas@...tr.de>,
	Seth Forshee <seth.forshee@...onical.com>
Subject: [PATCH v2 4/4] drm/i915: introduce intel_connector->reprobe

Introduce a struct edid *(*reprobe)(struct drm_connector *, struct
i2c_adapter *) in struct intel_connector to point to various get_edid()
functions.

Cc: Chris Wilson <chris@...is-wilson.co.uk>
Cc: Andreas Heider <andreas@...tr.de>
Cc: Seth Forshee <seth.forshee@...onical.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@...il.com>
---
 drivers/gpu/drm/i915/intel_crt.c  | 1 +
 drivers/gpu/drm/i915/intel_dp.c   | 1 +
 drivers/gpu/drm/i915/intel_drv.h  | 6 ++++++
 drivers/gpu/drm/i915/intel_lvds.c | 1 +
 drivers/gpu/drm/i915/intel_sdvo.c | 4 ++++
 5 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index b5b1b9b..4e678fe 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -832,6 +832,7 @@ void intel_crt_init(struct drm_device *dev)
 		crt->base.get_hw_state = intel_crt_get_hw_state;
 	}
 	intel_connector->get_hw_state = intel_connector_get_hw_state;
+	intel_connector->reprobe = intel_crt_get_edid;
 
 	drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs);
 
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 30c627c..2f4491c 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3657,6 +3657,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
 		intel_connector->get_hw_state = intel_ddi_connector_get_hw_state;
 	else
 		intel_connector->get_hw_state = intel_connector_get_hw_state;
+	intel_connector->reprobe = intel_dp_get_edid;
 
 	intel_dp->aux_ch_ctl_reg = intel_dp->output_reg + 0x10;
 	if (HAS_DDI(dev)) {
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 79f91f2..6ff89da 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -175,6 +175,12 @@ struct intel_connector {
 	 * and active (i.e. dpms ON state). */
 	bool (*get_hw_state)(struct intel_connector *);
 
+	/*
+	 * Points to the corresponding get_edid() functions for
+	 * LVDS, CRT, SDVO, and DP
+	 */
+	struct edid *(*reprobe)(struct drm_connector *, struct i2c_adapter *);
+
 	/* Panel info for eDP and LVDS */
 	struct intel_panel panel;
 
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index e7aa285..6a7078e 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -1050,6 +1050,7 @@ void intel_lvds_init(struct drm_device *dev)
 	intel_encoder->get_hw_state = intel_lvds_get_hw_state;
 	intel_encoder->get_config = intel_lvds_get_config;
 	intel_connector->get_hw_state = intel_connector_get_hw_state;
+	intel_connector->reprobe = intel_lvds_get_edid;
 
 	intel_connector_attach_encoder(intel_connector, intel_encoder);
 	intel_encoder->type = INTEL_OUTPUT_LVDS;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index beb40e5..2083993 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2420,6 +2420,7 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
 	}
 
 	intel_connector = &intel_sdvo_connector->base;
+	intel_connector->reprobe = intel_sdvo_get_edid;
 	connector = &intel_connector->base;
 	if (intel_sdvo_get_hotplug_support(intel_sdvo) &
 		intel_sdvo_connector->output_flag) {
@@ -2462,6 +2463,7 @@ intel_sdvo_tv_init(struct intel_sdvo *intel_sdvo, int type)
 		return false;
 
 	intel_connector = &intel_sdvo_connector->base;
+	intel_connector->reprobe = intel_sdvo_get_edid;
 	connector = &intel_connector->base;
 	encoder->encoder_type = DRM_MODE_ENCODER_TVDAC;
 	connector->connector_type = DRM_MODE_CONNECTOR_SVIDEO;
@@ -2502,6 +2504,7 @@ intel_sdvo_analog_init(struct intel_sdvo *intel_sdvo, int device)
 		return false;
 
 	intel_connector = &intel_sdvo_connector->base;
+	intel_connector->reprobe = intel_sdvo_get_edid;
 	connector = &intel_connector->base;
 	intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT;
 	encoder->encoder_type = DRM_MODE_ENCODER_DAC;
@@ -2535,6 +2538,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
 		return false;
 
 	intel_connector = &intel_sdvo_connector->base;
+	intel_connector->reprobe = intel_sdvo_get_edid;
 	connector = &intel_connector->base;
 	encoder->encoder_type = DRM_MODE_ENCODER_LVDS;
 	connector->connector_type = DRM_MODE_CONNECTOR_LVDS;
-- 
1.8.5.2.229.g4448466

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ