linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: airlied@linux.ie, linux-kernel@vger.kernel.org
Subject: [PATCH 2/9] gma500: Remove psb_intel_output from ddc_probe and ddc_get_modes
Date: Mon, 19 Dec 2011 21:40:05 +0000	[thread overview]
Message-ID: <20111219214004.32042.71173.stgit@bob.linux.org.uk> (raw)
In-Reply-To: <20111219213950.32042.20984.stgit@bob.linux.org.uk>

From: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/gpu/drm/gma500/psb_intel_drv.h   |    5 +++--
 drivers/gpu/drm/gma500/psb_intel_modes.c |   16 +++++++---------
 2 files changed, 10 insertions(+), 11 deletions(-)


diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h
index a4435d8..af34b24 100644
--- a/drivers/gpu/drm/gma500/psb_intel_drv.h
+++ b/drivers/gpu/drm/gma500/psb_intel_drv.h
@@ -166,8 +166,9 @@ struct psb_intel_crtc {
 struct psb_intel_i2c_chan *psb_intel_i2c_create(struct drm_device *dev,
 					const u32 reg, const char *name);
 void psb_intel_i2c_destroy(struct psb_intel_i2c_chan *chan);
-int psb_intel_ddc_get_modes(struct psb_intel_output *psb_intel_output);
-extern bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output);
+int psb_intel_ddc_get_modes(struct drm_connector *connector,
+			    struct i2c_adapter *adapter);
+extern bool psb_intel_ddc_probe(struct i2c_adapter *adapter);
 
 extern void psb_intel_crtc_init(struct drm_device *dev, int pipe,
 			    struct psb_intel_mode_device *mode_dev);
diff --git a/drivers/gpu/drm/gma500/psb_intel_modes.c b/drivers/gpu/drm/gma500/psb_intel_modes.c
index bde1aff..4fca0d6 100644
--- a/drivers/gpu/drm/gma500/psb_intel_modes.c
+++ b/drivers/gpu/drm/gma500/psb_intel_modes.c
@@ -26,7 +26,7 @@
  * psb_intel_ddc_probe
  *
  */
-bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output)
+bool psb_intel_ddc_probe(struct i2c_adapter *adapter)
 {
 	u8 out_buf[] = { 0x0, 0x0 };
 	u8 buf[2];
@@ -46,7 +46,7 @@ bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output)
 		 }
 	};
 
-	ret = i2c_transfer(&psb_intel_output->ddc_bus->adapter, msgs, 2);
+	ret = i2c_transfer(adapter, msgs, 2);
 	if (ret == 2)
 		return true;
 
@@ -59,18 +59,16 @@ bool psb_intel_ddc_probe(struct psb_intel_output *psb_intel_output)
  *
  * Fetch the EDID information from @connector using the DDC bus.
  */
-int psb_intel_ddc_get_modes(struct psb_intel_output *psb_intel_output)
+int psb_intel_ddc_get_modes(struct drm_connector *connector,
+			    struct i2c_adapter *adapter)
 {
 	struct edid *edid;
 	int ret = 0;
 
-	edid =
-	    drm_get_edid(&psb_intel_output->base,
-			 &psb_intel_output->ddc_bus->adapter);
+	edid = drm_get_edid(connector, adapter);
 	if (edid) {
-		drm_mode_connector_update_edid_property(&psb_intel_output->
-							base, edid);
-		ret = drm_add_edid_modes(&psb_intel_output->base, edid);
+		drm_mode_connector_update_edid_property(connector, edid);
+		ret = drm_add_edid_modes(connector, edid);
 		kfree(edid);
 	}
 	return ret;


  reply	other threads:[~2011-12-19 21:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 21:39 [PATCH 1/9] gma500: Initial support for our encoder and connector structs Alan Cox
2011-12-19 21:40 ` Alan Cox [this message]
2011-12-19 21:40 ` [PATCH 3/9] gma500: Fix encoder type checking for connectors Alan Cox
2011-12-19 21:40 ` [PATCH 4/9] gma500: Convert PSB LVDS to new output handling Alan Cox
2011-12-19 21:40 ` [PATCH 5/9] gma500: Add support for Intel GMBUS Alan Cox
2011-12-19 21:41 ` [PATCH 6/9] gma500: Replace SDVO code with slightly modified version from i915 Alan Cox
2011-12-19 21:41 ` [PATCH 7/9] gma500: Convert Cedarview to work with new output handling Alan Cox
2011-12-19 21:41 ` [PATCH 8/9] gma500: Convert Oaktrail " Alan Cox
2011-12-19 21:41 ` [PATCH 9/9] gma500: SDVO DDC bus guessing isn't working so hardcode it instead Alan Cox
2011-12-20 10:27 ` [PATCH 1/9] gma500: Initial support for our encoder and connector structs Dave Airlie
  -- strict thread matches above, loose matches on Subject: below --
2011-10-27 22:02 [PATCH 0/9] Split psb_intel_output to encoders and connectors Patrik Jakobsson
2011-10-27 22:02 ` [PATCH 2/9] gma500: Remove psb_intel_output from ddc_probe and ddc_get_modes Patrik Jakobsson

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=20111219214004.32042.71173.stgit@bob.linux.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=airlied@linux.ie \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).