Bug 22891 - [945GC SDVO-TV ]TV no Properties can be set
[945GC SDVO-TV ]TV no Properties can be set
Status: RESOLVED FIXED
Product: DRI
Classification: Unclassified
Component: DRM/Intel
unspecified
x86 (IA32) Linux (All)
: high major
Assigned To: ykzhao
Xorg Project Team
: patch
Depends on: 17776
Blocks: 23916
  Show dependency treegraph
 
Reported: 2009-07-22 07:24 UTC by Stefan
Modified: 2009-09-21 12:06 UTC (History)
25 users (show)

See Also:


Attachments
Picture TV (33.06 KB, image/jpeg)
2009-07-22 07:24 UTC, Stefan
no flags Details
dmesg log (35.59 KB, text/x-log)
2009-08-27 14:33 UTC, Bazin
no flags Details
lspci log (1.64 KB, text/x-log)
2009-08-27 14:34 UTC, Bazin
no flags Details
Xorg log with intel 2.8.1 driver (244.52 KB, text/x-log)
2009-08-27 14:35 UTC, Bazin
no flags Details
xrandr -q log (1003 bytes, text/x-log)
2009-08-27 14:36 UTC, Bazin
no flags Details
xrandr --verbose log (8.43 KB, text/x-log)
2009-08-27 14:37 UTC, Bazin
no flags Details
.config (97.26 KB, text/plain)
2009-09-01 02:18 UTC, Arnold
no flags Details
this is my .config for kernel (95.44 KB, application/octet-stream)
2009-09-04 11:40 UTC, Bazin
no flags Details
dmesg log on new kernel with KMS (38.76 KB, text/x-log)
2009-09-04 11:41 UTC, Bazin
no flags Details
xorg log on new kernel with KMS (281.54 KB, text/x-log)
2009-09-04 11:42 UTC, Bazin
no flags Details
Dmesg with drm.debug=15 (105.67 KB, text/x-log)
2009-09-13 22:52 UTC, Bazin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan 2009-07-22 07:24:07 UTC
Created attachment 27916 [details]
Picture TV

+++ This bug was initially created as a clone of Bug #17776 +++

Trying to enable TV output using the intel driver version 2.8.0 Xubuntu Kernel 2.6.30.10-12 on a D945GCLF2 board (945GC Express chipset, atom processor) works but iv got "underscan" on my screen.
I tried to change the default TV mode to PAL in xorg.conf and with xrandr with
Option "TV_Format" "PAL"
and 
xrandr --output TV --set TV_FORMAT PAL gives an "Bad Name" error.

Same while trying to set Left, Top and so on.

xrandr --verbose shows me no properties

If've tested it with Driver 2.4 to aktual 2.8.0 every time the same result so i think it is still a bug.
Comment 1 MaLing 2009-07-22 23:10:52 UTC
http://lists.freedesktop.org/archives/intel-gfx/2009-July/003502.html
please try the patch.

Thanks
Ma Ling
Comment 2 Stefan 2009-07-27 12:09:49 UTC
Hi,

i've tried the patch and after install the patched kernel xrandr shows me the properties for NTSC an PAL:

TV1 connected 640x480+0+0 (0x4d) normal (normal left inverted right x axis y axis) 0mm x 0mm
	Identifier: 0x3c
	Timestamp:  44963
	Subpixel:   horizontal rgb
	Clones:     VGA1
	CRTC:       1
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	mode:	NTSC_M
		supported: NTSC_M       NTSC_J       NTSC_443     PAL_B       
		           PAL_D        PAL_G        PAL_H        PAL_I       
		           PAL_M        PAL_N        PAL_NC       PAL_60      
		           SECAM_B      SECAM_D      SECAM_G      SECAM_K     
		           SECAM_K1     SECAM_L      SECAM_60    

but i cant set it:

$ xrandr --output TV1 --mode 720x576 --set TV_Format PAL_B
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  149 (RANDR)
  Minor opcode of failed request:  11 ()
  Serial number of failed request:  25
  Current serial number in output stream:  25

setting as Option in xorg.conf has no reason.

Any Ideas?

Thanks

Stefan 


Comment 3 Julien Cristau 2009-07-28 13:07:40 UTC
On Mon, Jul 27, 2009 at 12:09:52 -0700, bugzilla-daemon@freedesktop.org wrote:

> --- Comment #2 from Stefan <ste.otto@web.de>  2009-07-27 12:09:49 PST ---
> $ xrandr --output TV1 --mode 720x576 --set TV_Format PAL_B
> X Error of failed request:  BadName (named color or font does not exist)
>   Major opcode of failed request:  149 (RANDR)
>   Minor opcode of failed request:  11 ()
>   Serial number of failed request:  25
>   Current serial number in output stream:  25
> 
seems like the property is called "mode", not "TV_Format".
Comment 4 Stefan 2009-07-30 12:25:32 UTC
(In reply to comment #3)
> On Mon, Jul 27, 2009 at 12:09:52 -0700, bugzilla-daemon@freedesktop.org wrote:
> 
> > --- Comment #2 from Stefan <ste.otto@web.de>  2009-07-27 12:09:49 PST ---
> > $ xrandr --output TV1 --mode 720x576 --set TV_Format PAL_B
> > X Error of failed request:  BadName (named color or font does not exist)
> >   Major opcode of failed request:  149 (RANDR)
> >   Minor opcode of failed request:  11 ()
> >   Serial number of failed request:  25
> >   Current serial number in output stream:  25
> > 
> seems like the property is called "mode", not "TV_Format".
> 

Yes Thank You!

 Thats it - very simple:

xrandr --output TV1 --mode 720x576 --set mode PAL_B

But I still need overscan for watching TV. Iv got still a black border.
Is it possible to set the Margins with a patch to? 

Greatings

Stefan
Comment 5 Arnold 2009-08-26 09:06:18 UTC
Hello, I have the same issue with the D945GCLF2 board running Ubuntu 9.04. I already installed intel driver version 2.8.0. And also tried the suggested patch with several kernels (2.6.30.5, 2.6.31-rc2, 2.6.31-rc7). I don't get the additional mode options within xrandr. 

$ xrandr --output TV-1 --set mode PAL_B
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  150 (RANDR)
  Minor opcode of failed request:  11 ()
  Serial number of failed request:  25
  Current serial number in output stream:  25
$ xrandr --output TV-1 --set TV_FORMAT PAL_B
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  150 (RANDR)
  Minor opcode of failed request:  11 ()
  Serial number of failed request:  25
  Current serial number in output stream:  25
$ 

Any idea for me?
Comment 6 ykzhao 2009-08-26 23:05:11 UTC
(In reply to comment #5)
> Hello, I have the same issue with the D945GCLF2 board running Ubuntu 9.04. I
> already installed intel driver version 2.8.0. And also tried the suggested
> patch with several kernels (2.6.30.5, 2.6.31-rc2, 2.6.31-rc7). I don't get the
> additional mode options within xrandr. 
> 
> $ xrandr --output TV-1 --set mode PAL_B
> X Error of failed request:  BadName (named color or font does not exist)
>   Major opcode of failed request:  150 (RANDR)
>   Minor opcode of failed request:  11 ()
>   Serial number of failed request:  25
>   Current serial number in output stream:  25
> $ xrandr --output TV-1 --set TV_FORMAT PAL_B
> X Error of failed request:  BadName (named color or font does not exist)
>   Major opcode of failed request:  150 (RANDR)
>   Minor opcode of failed request:  11 ()
>   Serial number of failed request:  25
>   Current serial number in output stream:  25
> $ 
> 
Sorry that the patch related with SDVO-TV is not shipped by Eric.
So we will have to wait for it.

Thanks.
> Any idea for me?
> 

Comment 7 ykzhao 2009-08-26 23:41:46 UTC
(In reply to comment #5)
> Hello, I have the same issue with the D945GCLF2 board running Ubuntu 9.04. I
> already installed intel driver version 2.8.0. And also tried the suggested
> patch with several kernels (2.6.30.5, 2.6.31-rc2, 2.6.31-rc7). I don't get the
> additional mode options within xrandr. 
> 
If you apply the patch in comment #1 on the latest Eric's drm-intel-next tree, please use the following command to change TV property.    
xrandr --output TV1 --mode 720x576 --set mode PAL_B

The latest Eric's drm-intel-next tree can be obtained by using the following command:
   git clone git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel.git
   git branch -r
   git checkout origin/drm-intel-next

Thanks.

> $ 
> 
> Any idea for me?
> 

Comment 8 Arnold 2009-08-27 13:20:16 UTC
thanks for the fast response.

Something went wrong what I did. Checkout of Eric's driver was OK. Applying the patch was OK. 'make' and 'make install' was OK and overwrote my 2.6.31-rc7 kernel. But booting this kernel resulted in conflicts with the drm module.

Do I need a special kernel or some special configuration?
Comment 9 Bazin 2009-08-27 14:32:59 UTC
Hi i  apply this patch (in  #1)  on Eric's  drm-intel . 
I compiled this kernel  and after compiled i run :
 make install 
 make modules_install
 update-initramfs -c -v 2.6.31-rc7
 update-grub 

all is ok  bu i stil dont see aditional modes in "xrandr --verbose " 

Make it something wrong ?  . 

I use debian squeeze/sid  
Intel 2.8-1 driver 

I include Xorg.log , dmesg , lspci , Xrandr --verbose log , xrandr -q log 

(In reply to comment #7)
> (In reply to comment #5)
> > Hello, I have the same issue with the D945GCLF2 board running Ubuntu 9.04. I
> > already installed intel driver version 2.8.0. And also tried the suggested
> > patch with several kernels (2.6.30.5, 2.6.31-rc2, 2.6.31-rc7). I don't get the
> > additional mode options within xrandr. 
> > 
> If you apply the patch in comment #1 on the latest Eric's drm-intel-next tree,
> please use the following command to change TV property.    
> xrandr --output TV1 --mode 720x576 --set mode PAL_B
> 
> The latest Eric's drm-intel-next tree can be obtained by using the following
> command:
>    git clone git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel.git
>    git branch -r
>    git checkout origin/drm-intel-next
> 
> Thanks.
> 
> > $ 
> > 
> > Any idea for me?
> > 
> 

Comment 10 Bazin 2009-08-27 14:33:36 UTC
Created attachment 28958 [details]
dmesg log
Comment 11 Bazin 2009-08-27 14:34:38 UTC
Created attachment 28959 [details]
lspci log
Comment 12 Bazin 2009-08-27 14:35:32 UTC
Created attachment 28960 [details]
Xorg log with intel 2.8.1 driver
Comment 13 Bazin 2009-08-27 14:36:30 UTC
Created attachment 28961 [details]
xrandr -q log
Comment 14 Bazin 2009-08-27 14:37:01 UTC
Created attachment 28962 [details]
xrandr --verbose log
Comment 15 Arnold 2009-08-29 23:10:04 UTC
(In reply to comment #8)
> Something went wrong what I did. Checkout of Eric's driver was OK. Applying the
> patch was OK. 'make' and 'make install' was OK and overwrote my 2.6.31-rc7
> kernel. But booting this kernel resulted in conflicts with the drm module.
> Do I need a special kernel or some special configuration?

OK. This was my fault. I ignored an error message making modules_install ...
I now have a 2.6.31-rc7 running with the patch. But now I have the same behavior like Bazin in comment #9. 

xrandr --output TV1 --mode 720x576 --set mode PAL_B

still does not work and I don't see aditional modes in "xrandr --verbose"
Comment 16 ykzhao 2009-08-30 22:05:56 UTC
(In reply to comment #15)
> (In reply to comment #8)
> > Something went wrong what I did. Checkout of Eric's driver was OK. Applying the
> > patch was OK. 'make' and 'make install' was OK and overwrote my 2.6.31-rc7
> > kernel. But booting this kernel resulted in conflicts with the drm module.
> > Do I need a special kernel or some special configuration?
> 
> OK. This was my fault. I ignored an error message making modules_install ...
> I now have a 2.6.31-rc7 running with the patch. But now I have the same
> behavior like Bazin in comment #9. 
> 
> xrandr --output TV1 --mode 720x576 --set mode PAL_B
> 
It seems that the box is still booted with UMS mode.
Will you please boot the system with KMS enabled and see whether the SDVO-TV property can be set?
 You should enable "CONFIG_DRM_I915_KMS" in kernel configuration to enable KMS mode.
Thanks.
> still does not work and I don't see aditional modes in "xrandr --verbose"
> 

Comment 17 ykzhao 2009-08-30 23:32:42 UTC
The following commit is to add the tv_format property for SDVO-TV and already in Eric's drm-intel-next tree.

commit 9dd03a94888490bd2d112092b60d0895bd3f0371
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Aug 24 13:50:26 2009 +0800

    drm/i915: Enable PAL and SECAM format and add the propery for SDVO-TV

At the same time the following two patches add the other property for SDVO-TV/LVDS.
   >http://lists.freedesktop.org/archives/intel-gfx/2009-August/003986.html
     Add the window control/saturation/brightness/hue/contrast property for SDVO-TV
   http://lists.freedesktop.org/archives/intel-gfx/2009-August/003987.html
     Add the brightness property for SDVO-LVDS

It is noted that the above three patches are only for KMS.
thanks.

Comment 18 Arnold 2009-09-01 02:13:39 UTC
Hi,

that's not it. It now starts booting but after a while it stops with a black screen. I can't even switch to a console screen. I will attach my .config file. Maybe there is something to change.

Thanks

Arnold
Comment 19 Arnold 2009-09-01 02:18:04 UTC
Created attachment 29059 [details]
.config
Comment 20 Julien Cristau 2009-09-01 05:23:56 UTC
> --- Comment #18 from Arnold <arnold.erbsloeh@web.de>  2009-09-01 02:13:39 PST ---
> Hi,
> 
> that's not it. It now starts booting but after a while it stops with a black
> screen. I can't even switch to a console screen. I will attach my .config file.
> Maybe there is something to change.
> 
You probably want CONFIG_FRAMEBUFFER_CONSOLE=y.  Or at least make sure
the fbcon module is loaded.
Comment 21 Arnold 2009-09-02 06:31:14 UTC
CONFIG_FRAMEBUFFER_CONSOLE=y does not help.

How about Stefan and Bazin. Do you have it running now? If yes, could I please have your config file? Thanks!

Arnold
Comment 22 Bazin 2009-09-04 11:39:26 UTC
Hi all , i compiled kernel with KMS  and i see aditional modes  . 

<pre>
	mode:	PAL_B
		supported: NTSC_M       NTSC_J       NTSC_443     PAL_B       
		           PAL_D        PAL_G        PAL_H        PAL_I       
		           PAL_M        PAL_N        PAL_NC       PAL_60      
		           SECAM_B      SECAM_D      SECAM_G      SECAM_K     
		           SECAM_K1     SECAM_L      SECAM_60    

</pre>


But if i run xrandr --output TV1 --set mode PAL_D ,TV blink , but it still BW .
(my S-video -> scart cable have linked 15 and 20th  pin ) 


I attached .config , demesg and xorg log . 
Comment 23 Bazin 2009-09-04 11:40:51 UTC
Created attachment 29225 [details]
this is my .config for kernel
Comment 24 Bazin 2009-09-04 11:41:46 UTC
Created attachment 29226 [details]
dmesg log on new kernel with KMS
Comment 25 Bazin 2009-09-04 11:42:35 UTC
Created attachment 29227 [details]
xorg log on new kernel with KMS
Comment 26 Bazin 2009-09-12 11:59:43 UTC
Please someone have any ideas , how i can make this  patch work . 

if i run xrandr --output TV1 --set mode PAL_D , i see in dmesg  

[  177.124045] [drm] TV-8: set mode 1152x864 21
[  177.534140] i2c-adapter i2c-2: unable to read EDID block.
[  177.534149] i915 0000:00:02.0: SVIDEO-1: no EDID data

.

I compiled new kernel 2.6.31-rc8-git2 with patch and enabled KMS but still not work :( . 

What i make wrong . 

Thanks for help .
Comment 27 Bazin 2009-09-13 02:33:23 UTC
Hi . 

I  compiled latest Eric's drm-intel-next  . 

xrandr --verbose : 
	TV1 : 
        Identifier: 0x3c
	Timestamp:  2130833
	Subpixel:   horizontal rgb
	Clones:    
	CRTCs:      0 1
	Transform:  1.000000 0.000000 0.000000
	            0.000000 1.000000 0.000000
	            0.000000 0.000000 1.000000
	           filter: 
	brightness: 128 (0x00000080)	range:  (0,255)
	hue: 64 (0x00000040)	range:  (0,127)
	contrast: 64 (0x00000040)	range:  (0,127)
	saturation: 69 (0x00000045)	range:  (0,127)
	vpos: 512 (0x00000200)	range:  (0,1023)
	hpos: 512 (0x00000200)	range:  (0,1023)
	bottom_margin: 15 (0x0000000f)	range:  (0,47)
	top_margin: 15 (0x0000000f)	range:  (0,47)
	right_margin: 15 (0x0000000f)	range:  (0,47)
	left_margin: 15 (0x0000000f)	range:  (0,47)
	mode:	PAL_B
		supported: NTSC_M       NTSC_J       NTSC_443     PAL_B       
		           PAL_D        PAL_G        PAL_H        PAL_I       
		           PAL_M        PAL_N        PAL_NC       PAL_60      
		           SECAM_B      SECAM_D      SECAM_G      SECAM_K     
		           SECAM_K1     SECAM_L      SECAM_60 
      .......
   

but tv is still B/W .  

If i run xrandr --output TV1 --set mode PAL_D 
i see in dmesg :  [drm] TV-8: set mode  4c . But if i change PAL_D to pal B i see same message in dmesg  (TV-8: set mode  4c ) , this message not depend on format ( i try  NTSC_M and still se same message )  
 
Comment 28 ykzhao 2009-09-13 18:40:16 UTC
Will you please add the boot option of "drm.debug=15" and try to change the SDVO-TV format by using xrandr tool?
    After the test, please attach the output of dmesg.

Please also ignore the following message and confirm whether the TV format is changed after using the xrandr tool.
   >[drm] TV-8: set mode  4c

Thanks.
Comment 29 Bazin 2009-09-13 22:52:50 UTC
Created attachment 29502 [details]
Dmesg with drm.debug=15 

Hi , i added drm.debug=15 into kernel options (its unknown parameter ) , but i see in logs debugin messages . 

on cca  5 mins i got  225 Mb log :D . Here is  dmesg output after xrandr  ...  and i attached kern.log )
Comment 30 ykzhao 2009-09-13 23:03:04 UTC
The following two patches are already shipped in the Eric's drm-intel-next tree. 

1.  commit ce6feabd1b38f9adf4a962d71bc4762047e8f889
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Aug 24 13:50:26 2009 +0800

    drm/i915: Enable PAL and SECAM format and add the propery for SDVO-TV

2. commit b9219c5e8be99ddd697e3f9b61069d7ea477ddec
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Thu Sep 10 15:45:46 2009 +0800

    drm/i915: Add the enhancement property for SDVO-TV

And the following property is added for SDVO-TV
   a. TV format
   b. left/right/top/botton margin 
   c. brightness/hue/saturation/contrast

So the bug will be marked as resolved.

Thanks.

Comment 31 ykzhao 2009-09-13 23:05:36 UTC
Hi, Bazin
    Maybe the issue on your box is not related with the SDVO-TV property.
    
   Will you please open a new bug and attach the required dmesg log?
   Thanks.
Comment 32 Arnold 2009-09-21 12:06:42 UTC
Ubuntu seems to have some trouble booting with KMS. I finally got it running with Ubuntu 9.10 Alpha 6. I can switch between the modes now with the same symptoms as Bazin describes. So I will also subscribe to the new bug report. It's #23916