View Single Post
Old 02-05-10, 11:11 AM   #19
damdim
Registered User
 
Join Date: Jan 2010
Posts: 21
Default Re: Linux backlight driver

Quote:
Originally Posted by keptile View Post
Hi,

I have a Sony Vaio CW series laptop with GT230M. I tried to load the driver but it failed to load by telling me that there are no supported Nvidia chips. So I took the PCI ID of the card from http://us.download.nvidia.com/XFree8...ppendix-a.html and added it to DEFINE_PCI_DEVICE_TABLE and recompiled the driver. The driver loads this time, but brightness control still does not work.

Just to let you know...

Keptile
I also have a Sony Vaio CW1S1E with GT230M. After spending time trying things I can now control the backlight of the laptop. I added this line to DEFINE_PCI_DEVICE_TABLE
Code:
/* NVIDIA Geforce 230M */
	{ PCI_VDEVICE(NVIDIA, 0x0A2A), (kernel_ulong_t)&nv5x_driver_data },
Make sure that at the end is nv5x_driver_data not nv4x_driver_data

Then the backlight worked but not proportional with the slider of kde powerdevil.
So I think I found the best values for my case in static struct driver_data nv5x_driver_data section
Code:
static struct driver_data nv5x_driver_data = {
	.bar           = 0,
	.reg_offset    = NV5X_PDISPLAY_OFFSET + NV5X_PDISPLAY_SOR0_BRIGHTNESS,
	.reg_size      = 1,
	.off           = 0,
	.min           = 5,
	.max           = 117,
	.backlight_ops = {
#ifdef USE_BACKLIGHT_SUSPEND
		.options        = BL_CORE_SUSPENDRESUME,
#endif
		.get_brightness = nv5x_get_intensity,
		.update_status  = nv5x_set_intensity,
	}
If anyone can advice for better values or explain what some variables are for f.e. .reg_offset, .reg_size is welcome.

Be carefull that if values are wrong you might turn off the screen and need a blind reboot
damdim is offline   Reply With Quote