Skip to contentSkip to conversation

Support for the ns2501 dvo

PATCH Superseded Thomas Richter 3 participants 9 messages Jun 16, 2012 – Jun 17, 2012 2 messages not in the archive

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support for the ns2501 dvo

Hi Daniel, dear developers,

unfortunately the patch I submitted last week for supporting the ns2501 has never been picked up, so I'm trying again.

This version here improves the patch considerably, not only are 800x600,1024x768 and 640x480 now supported, it also includes support for DPMS. The previous version just disabled the DVO, leaving some random pattern on the screen. This one also turns the backlight off.

Greetings,
Thomas

drivers/gpu/drm/i915/Makefile +1 -0
index 2e9268d..8e8e41f 100644
@@ -39,6 +39,7 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \
 	  dvo_ivch.o \
 	  dvo_tfp410.o \
 	  dvo_sil164.o \
+	  dvo_ns2501.o \
 	  i915_gem_dmabuf.o
 
 i915-$(CONFIG_COMPAT)   += i915_ioc32.o
drivers/gpu/drm/i915/dvo.h +1 -0
index 8c2ad01..a2af75c 100644
@@ -140,5 +140,6 @@ extern struct intel_dvo_dev_ops ch7xxx_ops;
 extern struct intel_dvo_dev_ops ivch_ops;
 extern struct intel_dvo_dev_ops tfp410_ops;
 extern struct intel_dvo_dev_ops ch7017_ops;
+extern struct intel_dvo_dev_ops ns2501_ops;
 
 #endif /* _INTEL_DVO_H */
drivers/gpu/drm/i915/dvo_ns2501.c new file +566 -0

566 lines not on this page · raw message

drivers/gpu/drm/i915/intel_display.c +3 -1
index 0161d94..70b83a1 100644
@@ -1280,8 +1280,10 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,
  * protect mechanism may be enabled.
  *
  * Note!  This is for pre-ILK only.
+ *
+ * Unfortunately needed by dvo_ns2501 since the dvo depends on it running.
  */
-static void intel_enable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
+void intel_enable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
 	int reg;
 	u32 val;
drivers/gpu/drm/i915/intel_dvo.c +9 -1
index 60ba50b9..68c1893 100644
@@ -37,6 +37,7 @@
 #define SIL164_ADDR	0x38
 #define CH7xxx_ADDR	0x76
 #define TFP410_ADDR	0x38
+#define NS2501_ADDR     0x38
 
 static const struct intel_dvo_device intel_dvo_devices[] = {
 	{
@@ -74,7 +75,14 @@ static const struct intel_dvo_device intel_dvo_devices[] = {
 		.slave_addr = 0x75,
 		.gpio = GMBUS_PORT_DPB,
 		.dev_ops = &ch7017_ops,
-	}
+	},
+	{
+	        .type = INTEL_DVO_CHIP_TMDS,
+		.name = "ns2501",
+		.dvo_reg = DVOC,
+		.slave_addr = NS2501_ADDR,
+		.dev_ops = &ns2501_ops,
+       }
 };
 
 struct intel_dvo {

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw

Dear Thomas,

thank you for your patch and patience.

Am Sonntag, den 17.06.2012, 00:22 +0200 schrieb Thomas Richter:

Quoted 7 lines

unfortunately the patch I submitted last week for supporting the ns2501 has never been picked up, so I'm trying again.

This version here improves the patch considerably, not only are 800x600,1024x768 and 640x480 now supported, it also includes support for DPMS. The previous version just disabled the DVO, leaving some random pattern on the screen. This one also turns the backlight off.

Since this patch is not only a resend but also an improvement please mark it with »[PATCH vX]« where X is the iteration next time.

Also your patch is not created with the Git tool and therefore (not necessarily) misses some required things as the Signed-off-by line and a proper commit message (summary and body).

Using these tools also makes the life for the other developers easier although it might take you some time in the beginning.

Thanks,

Paul

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

A message that is not in the archive (sent off-list or not yet received): 17968_1339936138_4FDDCD8A_17968_12904_1_1339936115.13513.4.camel@mattotaupa

#3 lore raw
Quoted 11 lines · Paul Menzel

Dear Thomas,

thank you for your patch and patience.

Since this patch is not only a resend but also an improvement please mark it with »[PATCH vX]« where X is the iteration next time.

Also your patch is not created with the Git tool and therefore (not necessarily) misses some required things as the Signed-off-by line and a proper commit message (summary and body).

Actually, it was created by "git diff HEAD". (-; Anyhow, how do I need to submit it so it gets accepted (or to make this at least easier?)

Quoted 2 lines

Using these tools also makes the life for the other developers easier although it might take you some time in the beginning.

All understood - please provide some advice.

Greetings,
Thomas
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 9 lines · Thomas Richter
Quoted 8 lines · Paul Menzel

Dear Thomas,

thank you for your patch and patience.

Since this patch is not only a resend but also an improvement please mark it with »[PATCH vX]« where X is the iteration next time.

Quoted 7 lines
Quoted 3 lines

Also your patch is not created with the Git tool and therefore (not necessarily) misses some required things as the Signed-off-by line and a proper commit message (summary and body).

Actually, it was created by "git diff HEAD". (-; Anyhow, how do I need to submit it so it gets accepted (or to make this at least easier?)

git format-patch -1 HEAD

Quoted 4 lines
Quoted 2 lines

Using these tools also makes the life for the other developers easier although it might take you some time in the beginning.

All understood - please provide some advice.

Imo you don't need anything else, the only other thing missing is the signed-off-by line, see Documentation/SubmittingPatches. -Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
#5 lore raw

Am Sonntag, den 17.06.2012, 20:36 +0200 schrieb Daniel Vetter:

Quoted 8 lines · Thomas Richter
Quoted 7 lines · Paul Menzel
Quoted 6 lines

thank you for your patch and patience.

Since this patch is not only a resend but also an improvement please mark it with »[PATCH vX]« where X is the iteration next time.

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines

Also your patch is not created with the Git tool and therefore (not necessarily) misses some required things as the Signed-off-by line and a proper commit message (summary and body).

Actually, it was created by "git diff HEAD". (-; Anyhow, how do I need to submit it so it gets accepted (or to make this at least easier?)

*Before* creating the patch you have to commit your changes.

git commit -a -s

-s adds your Signed-off-by line automatically. You can configure your data with the following commands.

        git config --global user.name "Thomas Richter"
        git config --global user.email [email protected]

For the commit message give a summary with less than 72 characters, add a blank line and give an elaborate explanation.

Quoted 1 line

git format-patch -1 HEAD

For patch iterations do the following.

    git format-patch --subject-prefix="PATCH v2" -1 HEAD

The manual pages are pretty elaborate (git help format-patch).

git send-email can also send the patch for you.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Using these tools also makes the life for the other developers easier although it might take you some time in the beginning.

All understood - please provide some advice.

Imo you don't need anything else, the only other thing missing is the signed-off-by line, see Documentation/SubmittingPatches.

As written above -s adds that automatically.

Thanks,

Paul

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

A message that is not in the archive (sent off-list or not yet received): 17968_1339958121_4FDE2369_17968_14180_1_20120617183640.GA4798@phenom.ffwll.local

#7 lore raw

PATCH v3 1/1 Support for ns2501 DVO.

Includes now proper DPMS support.
Includes switching between resolutions - from 640x480 to 1024x768. Currently assumes that the native display resolution is 1024x768.

The ns2501 seems to be rather critical - if the output PLL is not running, the chip doesn't seem to be clocked and then doesn't react on i2c messages. Thus, a quick'n-dirty trick ensures that the DVO is active before submitting any i2c messages to it. This is probably to be reviewed.

---
 drivers/gpu/drm/i915/Makefile        |    1 +
 drivers/gpu/drm/i915/dvo.h           |    1 +
 drivers/gpu/drm/i915/dvo_ns2501.c    |  566 
++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_display.c |    4 +-
 drivers/gpu/drm/i915/intel_dvo.c     |   10 +-
 5 files changed, 580 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/dvo_ns2501.c
drivers/gpu/drm/i915/Makefile +1 -0
index 2e9268d..8e8e41f 100644
@@ -39,6 +39,7 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \
 	  dvo_ivch.o \
 	  dvo_tfp410.o \
 	  dvo_sil164.o \
+	  dvo_ns2501.o \
 	  i915_gem_dmabuf.o
 
 i915-$(CONFIG_COMPAT)   += i915_ioc32.o
drivers/gpu/drm/i915/dvo.h +1 -0
index 8c2ad01..a2af75c 100644
@@ -140,5 +140,6 @@ extern struct intel_dvo_dev_ops ch7xxx_ops;
 extern struct intel_dvo_dev_ops ivch_ops;
 extern struct intel_dvo_dev_ops tfp410_ops;
 extern struct intel_dvo_dev_ops ch7017_ops;
+extern struct intel_dvo_dev_ops ns2501_ops;
 
 #endif /* _INTEL_DVO_H */
drivers/gpu/drm/i915/dvo_ns2501.c new file +566 -0

566 lines not on this page · raw message

drivers/gpu/drm/i915/intel_display.c +3 -1
index 0161d94..70b83a1 100644
@@ -1280,8 +1280,10 @@ static void assert_pch_ports_disabled(struct drm_i915_private *dev_priv,
  * protect mechanism may be enabled.
  *
  * Note!  This is for pre-ILK only.
+ *
+ * Unfortunately needed by dvo_ns2501 since the dvo depends on it running.
  */
-static void intel_enable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
+void intel_enable_pll(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
 	int reg;
 	u32 val;
drivers/gpu/drm/i915/intel_dvo.c +9 -1
index 60ba50b9..68c1893 100644
@@ -37,6 +37,7 @@
 #define SIL164_ADDR	0x38
 #define CH7xxx_ADDR	0x76
 #define TFP410_ADDR	0x38
+#define NS2501_ADDR     0x38
 
 static const struct intel_dvo_device intel_dvo_devices[] = {
 	{
@@ -74,7 +75,14 @@ static const struct intel_dvo_device intel_dvo_devices[] = {
 		.slave_addr = 0x75,
 		.gpio = GMBUS_PORT_DPB,
 		.dev_ops = &ch7017_ops,
-	}
+	},
+	{
+	        .type = INTEL_DVO_CHIP_TMDS,
+		.name = "ns2501",
+		.dvo_reg = DVOC,
+		.slave_addr = NS2501_ADDR,
+		.dev_ops = &ns2501_ops,
+       }
 };
 
 struct intel_dvo {
Signature · 1 line
1.7.2.5
#8 lore raw

Re: [PATCH v3] Support for ns2501 DVO.

Dear Thomas,

you put Daniel address twice into the CC field.

Am Sonntag, den 17.06.2012, 20:59 +0200 schrieb Thomas Richter:

Quoted 3 lines

Includes now proper DPMS support.
Includes switching between resolutions - from 640x480 to 1024x768. Currently assumes that the native display resolution is 1024x768.

Please put that after the next paragraph.

Quoted 5 lines

The ns2501 seems to be rather critical - if the output PLL is not running, the chip doesn't seem to be clocked and then doesn't react on i2c messages. Thus, a quick'n-dirty trick ensures that the DVO is active before submitting any i2c messages to it. This is probably to be reviewed.

Such for the commit message unnecessary information goes below the first --- below.

Quoted 2 lines

---

Here goes email message information.

Quoted 4 lines
  drivers/gpu/drm/i915/Makefile        |    1 +
  drivers/gpu/drm/i915/dvo.h           |    1 +
  drivers/gpu/drm/i915/dvo_ns2501.c    |  566 

++++++++++++++++++++++++++++++++++

Unfortunately you have to resend as v4 since your mailer line wrapped this line and others.

[…]

Thanks,

Paul

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw

Re: [PATCH v3] Support for ns2501 DVO.

Quoted 13 lines · Paul Menzel

Dear Thomas,

you put Daniel address twice into the CC field.

Am Sonntag, den 17.06.2012, 20:59 +0200 schrieb Thomas Richter:

Quoted 3 lines

Includes now proper DPMS support.
Includes switching between resolutions - from 640x480 to 1024x768. Currently assumes that the native display resolution is 1024x768.

Please put that after the next paragraph.

Quoted 8 lines
Quoted 5 lines

The ns2501 seems to be rather critical - if the output PLL is not running, the chip doesn't seem to be clocked and then doesn't react on i2c messages. Thus, a quick'n-dirty trick ensures that the DVO is active before submitting any i2c messages to it. This is probably to be reviewed.

Such for the commit message unnecessary information goes below the first --- below.

Fully disagree, this explains why the patch exports a function from intel_display.c and hence _must_ be part of the commit message.

While you resend, can you also please add bug links to the s-o-b section of your patch?

Quoted 5 lines
Quoted 2 lines

---

Here goes email message information.

Quoted 7 lines
Quoted 4 lines
  drivers/gpu/drm/i915/Makefile        |    1 +
  drivers/gpu/drm/i915/dvo.h           |    1 +
  drivers/gpu/drm/i915/dvo_ns2501.c    |  566 

++++++++++++++++++++++++++++++++++

Unfortunately you have to resend as v4 since your mailer line wrapped this line and others.

Yeah, patch is corrupted, I guess the easiest thing is to simply append the file generated with format-patch - I can also slurp that one in.

Thanks, Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
#10 lore raw

Re: [PATCH v3] Support for ns2501 DVO.

Am Sonntag, den 17.06.2012, 21:42 +0200 schrieb Daniel Vetter:

Quoted 18 lines · Paul Menzel
Quoted 17 lines

you put Daniel address twice into the CC field.

Am Sonntag, den 17.06.2012, 20:59 +0200 schrieb Thomas Richter:

Quoted 3 lines

Includes now proper DPMS support.
Includes switching between resolutions - from 640x480 to 1024x768. Currently assumes that the native display resolution is 1024x768.

Please put that after the next paragraph.

Quoted 5 lines

The ns2501 seems to be rather critical - if the output PLL is not running, the chip doesn't seem to be clocked and then doesn't react on i2c messages. Thus, a quick'n-dirty trick ensures that the DVO is active before submitting any i2c messages to it. This is probably to be reviewed.

Quoted 5 lines
Quoted 2 lines

Such for the commit message unnecessary information goes below the first --- below.

Fully disagree, this explains why the patch exports a function from intel_display.c and hence _must_ be part of the commit message.

Of course I meant »This is probably to be reviewed.«.

Quoted 13 lines

While you resend, can you also please add bug links to the s-o-b section of your patch?

Quoted 10 lines
Quoted 2 lines

---

Here goes email message information.

Quoted 4 lines
  drivers/gpu/drm/i915/Makefile        |    1 +
  drivers/gpu/drm/i915/dvo.h           |    1 +
  drivers/gpu/drm/i915/dvo_ns2501.c    |  566 

++++++++++++++++++++++++++++++++++

Quoted 5 lines
Quoted 2 lines

Unfortunately you have to resend as v4 since your mailer line wrapped this line and others.

Yeah, patch is corrupted, I guess the easiest thing is to simply append the file generated with format-patch - I can also slurp that one in.

But inline patches are preferred though.

Thanks,

Paul

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx