s3cfb_ams310fn07.c question

Kernel development related

s3cfb_ams310fn07.c question

Postby MadRocker » Tue Feb 15, 2011 8:33 pm

Experimental-2.6.29-Dopi 11Feb2011 download.
s3cfb_ams310fn07.c

Can someone help with this as I see this file contains this ams320fs01_brightness_set and I presume it should be this ams310fn07_brightness_set ?

Code: Select all
static void ams320fs01_brightness_set(struct led_classdev *led_cdev, enum led_brightness value)
{
   mutex_lock(&ams320fs01_backlight_lock);
   ams320fs01_backlight_brightness = value;
   ams320fs01_set_backlight_level(ams320fs01_backlight_brightness);
   mutex_unlock(&ams320fs01_backlight_lock);
}

static struct led_classdev ams320fs01_backlight_led  = {
   .name      = "lcd-backlight",
   .brightness = AMS320FS01_DEFAULT_BACKLIGHT_BRIGHTNESS,
   .brightness_set = ams320fs01_brightness_set,


So is it safe to replace all the ams320fs01 with ams310fn07 or am I missing something ?
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Advertisement

       

Re: s3cfb_ams310fn07.c question

Postby Dopi » Tue Feb 15, 2011 10:16 pm

Hi MadRocker,

you are right. This is confusing. I copied the original s3cfb_ams320fs01.c file to s3cfb_ams310fn07.c. In order not to break any function call in other parts of the s3cfb driver I did not rename the functions. Thus s3cfb_ams310fn07.c ontains function calls that look like in s3cfb_ams320fs01.c. The functions are (and mayb be) modified for the Jet display and are compiled once selected via the corresponding config option.

Cheers,
Dopi
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Re: s3cfb_ams310fn07.c question

Postby MadRocker » Wed Feb 16, 2011 8:28 am

Just tried to use them and this error came up:
Code: Select all
  CC      drivers/video/samsung/s3cfb_ams310fn07.o
drivers/video/samsung/s3cfb_ams310fn07.c: In function 'lcd_gamma_change':
drivers/video/samsung/s3cfb_ams310fn07.c:1682: warning: ISO C90 forbids mixed declarations and code
drivers/video/samsung/s3cfb_ams310fn07.c: In function 'lcd_power_ctrl':
drivers/video/samsung/s3cfb_ams310fn07.c:1711: warning: unused variable 'data'
drivers/video/samsung/s3cfb_ams310fn07.c: In function 'backlight_ctrl':
drivers/video/samsung/s3cfb_ams310fn07.c:1809: warning: unused variable 'param_lcd_level'
drivers/video/samsung/s3cfb_ams310fn07.c:1808: warning: unused variable 'data'
drivers/video/samsung/s3cfb_ams310fn07.c: In function 'ams320fs01_ioctl':
drivers/video/samsung/s3cfb_ams310fn07.c:1945: warning: unused variable 'argp'
drivers/video/samsung/s3cfb_ams310fn07.c: At top level:
drivers/video/samsung/s3cfb_ams310fn07.c:176: warning: 'lcd_gpio_init' defined but not used
drivers/video/samsung/s3cfb_ams310fn07.c:258: warning: 'backlight_gpio_init' defined but not used
drivers/video/samsung/s3cfb_ams310fn07.c:468: warning: 'standby_off_table' defined but not used
drivers/video/samsung/s3cfb_ams310fn07.c:516: warning: 'power_off_setting_table' defined but not used
drivers/video/samsung/s3cfb_ams310fn07.c:1897: warning: 'ams320fs01_backlight_off' defined but not used
drivers/video/samsung/s3cfb_ams310fn07.c:1899: warning: 'ams320fs01_backlight_last_level' defined but not used


So I changed the naming to hopefully what is correct and no build error. Just need to test them to confirm if they are now good. If anyone can verify this changes and if good we can add them to the 2.6.29 kernel.

Added is the ioctl from s3cfb_ams320fs01 converted to s3cfb_ams310fn07 if needed.
You do not have the required permissions to view the files attached to this post.
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Re: s3cfb_ams310fn07.c question

Postby Dopi » Wed Feb 16, 2011 10:29 am

MadRocker wrote:So I changed the naming to hopefully what is correct and no build error. Just need to test them to confirm if they are now good. If anyone can verify this changes and if good we can add them to the 2.6.29 kernel.

Added is the ioctl from s3cfb_ams320fs01 converted to s3cfb_ams310fn07 if needed.

Hi MadRocker, Thanks for providing this. I will test it and see if it works. If it is okay I will add it to the main kernel tree.

Cheers,
Dopi

P.S.: Please also consider using patch files instead of changed source files. Like that it is much easier to see what has changed. In a git repository you can easily generate patches by running "git diff".
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm

Re: s3cfb_ams310fn07.c question

Postby MadRocker » Thu Feb 17, 2011 5:39 am

Yup they need some more work. Git will get on that next.

Another quick question I see in the 2.6.3* files there is a
Code: Select all
   s3c_fimd.width      = 42;
   s3c_fimd.height    = 70;
   s3c_fimd.xres       = S3C_FB_HRES;
   s3c_fimd.yres       = S3C_FB_VRES;


I presume this value below 40 / 67 mm is the correct values to replace the 42 / 70 instinct above, only needed as backup if I can not find a pre-patched s3cfb_ams310fn07.c for the new kernels ?

I/gralloc ( 2251): width = 40 mm (304.799988 dpi)
I/gralloc ( 2251): height = 67 mm (303.283569 dpi)
MadRocker
Dev Team
Dev Team
 
Posts: 528
Joined: Sun Dec 12, 2010 7:15 am

Re: s3cfb_ams310fn07.c question

Postby Dopi » Thu Feb 17, 2011 7:45 am

MadRocker wrote:I presume this value below 40 / 67 mm is the correct values to replace the 42 / 70 instinct above, only needed as backup if I can not find a pre-patched s3cfb_ams310fn07.c for the new kernels ?

I/gralloc ( 2251): width = 40 mm (304.799988 dpi)
I/gralloc ( 2251): height = 67 mm (303.283569 dpi)

Yes. The values in these fields are screen dimensions in milimeters. Previous versions of the 2.6.29 driver had pixel dimensions in there and had problems with small values e.g. 40 / 67 as these values were used in other places. If the newer driver does already have small values I see not problems in changing them.

Cheers,
Dopi
Ad banners support the JetDroid forum. Please consider clicking them once in a while.
User avatar
Dopi
Dev Team
Dev Team
 
Posts: 926
Joined: Sun Aug 22, 2010 9:47 pm


Return to JetKernel

Who is online

Users browsing this forum: No registered users and 1 guest

  • Advertisement
cron