linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* It has added ARGB1888 and ARGB4888 features to Samsung SoC  Framebuffer driver.
@ 2009-04-09  7:59 InKi Dae
  2009-04-09 16:59 ` Kyungmin Park
  0 siblings, 1 reply; 3+ messages in thread
From: InKi Dae @ 2009-04-09  7:59 UTC (permalink / raw)
  To: ben-linux; +Cc: linux-fbdev-devel, linux-kernel

This patch supports ARGB1888 and ARGB4888 for Samsung SoC Framebuffer
driver. (s3c-fb.c)
I tested and is working fine.

If this patch has any problem, please let me know.
I'll look forward to applying to mainline.

Thank you,
InKi Dae.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index e0e7899..55d2298 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -358,9 +358,16 @@ static int s3c_fb_set_par(struct fb_info *info)
  writel(data, regs + VIDOSD_B(win_no));

  data = var->xres * var->yres;
+
+ u32 osdc_data = 0;
+
+ osdc_data = VIDISD14C_ALPHA1_R(0xf) |
+  VIDISD14C_ALPHA1_G(0xf) |
+  VIDISD14C_ALPHA1_B(0xf);
+
  if (s3c_fb_has_osd_d(win_no)) {
   writel(data, regs + VIDOSD_D(win_no));
-  writel(0, regs + VIDOSD_C(win_no));
+  writel(osdc_data, regs + VIDOSD_C(win_no));
  } else
   writel(data, regs + VIDOSD_C(win_no));

@@ -409,8 +416,12 @@ static int s3c_fb_set_par(struct fb_info *info)
     data |= WINCON1_BPPMODE_19BPP_A1666;
    else
     data |= WINCON1_BPPMODE_18BPP_666;
-  } else if (var->transp.length != 0)
-   data |= WINCON1_BPPMODE_25BPP_A1888;
+  } else if (var->transp.length == 1)
+   data |= WINCON1_BPPMODE_25BPP_A1888
+    | WINCON1_BLD_PIX;
+  else if (var->transp.length == 4)
+   data |= WINCON1_BPPMODE_28BPP_A4888
+    | WINCON1_BLD_PIX | WINCON1_ALPHA_SEL;
   else
    data |= WINCON0_BPPMODE_24BPP_888;

@@ -418,6 +429,20 @@ static int s3c_fb_set_par(struct fb_info *info)
   break;
  }

+ /* It has no color key control register for window0 */
+ if (win_no > 0) {
+  u32 keycon0_data = 0, keycon1_data = 0;
+
+  keycon0_data = ~(WxKEYCON0_KEYBL_EN |
+    WxKEYCON0_KEYEN_F |
+    WxKEYCON0_DIRCON) | WxKEYCON0_COMPKEY(0);
+
+  keycon1_data = WxKEYCON1_COLVAL(0xffffff);
+
+  writel(keycon0_data, regs + WxKEYCONy(win_no-1, 0));
+  writel(keycon1_data, regs + WxKEYCONy(win_no-1, 1));
+ }
+
  writel(data, regs + WINCON(win_no));
  writel(0x0, regs + WINxMAP(win_no));

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: It has added ARGB1888 and ARGB4888 features to Samsung SoC  Framebuffer driver.
  2009-04-09  7:59 It has added ARGB1888 and ARGB4888 features to Samsung SoC Framebuffer driver InKi Dae
@ 2009-04-09 16:59 ` Kyungmin Park
  2009-04-10  1:06   ` InKi Dae
  0 siblings, 1 reply; 3+ messages in thread
From: Kyungmin Park @ 2009-04-09 16:59 UTC (permalink / raw)
  To: InKi Dae; +Cc: ben-linux, linux-fbdev-devel, linux-kernel, kyungmin.park

Hi,

On Thu, Apr 9, 2009 at 12:59 AM, InKi Dae <daeinki@gmail.com> wrote:
> This patch supports ARGB1888 and ARGB4888 for Samsung SoC Framebuffer
> driver. (s3c-fb.c)
> I tested and is working fine.
>
> If this patch has any problem, please let me know.
> I'll look forward to applying to mainline.
>
> Thank you,
> InKi Dae.

Please give you signed-off-by here and more descriptions

>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index e0e7899..55d2298 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -358,9 +358,16 @@ static int s3c_fb_set_par(struct fb_info *info)
>  writel(data, regs + VIDOSD_B(win_no));
>
>  data = var->xres * var->yres;
> +
> + u32 osdc_data = 0;
> +
> + osdc_data = VIDISD14C_ALPHA1_R(0xf) |
> +  VIDISD14C_ALPHA1_G(0xf) |
> +  VIDISD14C_ALPHA1_B(0xf);
> +
>  if (s3c_fb_has_osd_d(win_no)) {
>   writel(data, regs + VIDOSD_D(win_no));
> -  writel(0, regs + VIDOSD_C(win_no));
> +  writel(osdc_data, regs + VIDOSD_C(win_no));
>  } else
>   writel(data, regs + VIDOSD_C(win_no));
>
> @@ -409,8 +416,12 @@ static int s3c_fb_set_par(struct fb_info *info)
>     data |= WINCON1_BPPMODE_19BPP_A1666;
>    else
>     data |= WINCON1_BPPMODE_18BPP_666;
> -  } else if (var->transp.length != 0)
> -   data |= WINCON1_BPPMODE_25BPP_A1888;
> +  } else if (var->transp.length == 1)
> +   data |= WINCON1_BPPMODE_25BPP_A1888
> +    | WINCON1_BLD_PIX;
> +  else if (var->transp.length == 4)
> +   data |= WINCON1_BPPMODE_28BPP_A4888
> +    | WINCON1_BLD_PIX | WINCON1_ALPHA_SEL;
>   else
>    data |= WINCON0_BPPMODE_24BPP_888;
>
> @@ -418,6 +429,20 @@ static int s3c_fb_set_par(struct fb_info *info)
>   break;
>  }
>
> + /* It has no color key control register for window0 */
> + if (win_no > 0) {
> +  u32 keycon0_data = 0, keycon1_data = 0;
> +
> +  keycon0_data = ~(WxKEYCON0_KEYBL_EN |
> +    WxKEYCON0_KEYEN_F |
> +    WxKEYCON0_DIRCON) | WxKEYCON0_COMPKEY(0);
> +
> +  keycon1_data = WxKEYCON1_COLVAL(0xffffff);
> +
> +  writel(keycon0_data, regs + WxKEYCONy(win_no-1, 0));
> +  writel(keycon1_data, regs + WxKEYCONy(win_no-1, 1));
> + }
> +
>  writel(data, regs + WINCON(win_no));
>  writel(0x0, regs + WINxMAP(win_no));
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: It has added ARGB1888 and ARGB4888 features to Samsung SoC  Framebuffer driver.
  2009-04-09 16:59 ` Kyungmin Park
@ 2009-04-10  1:06   ` InKi Dae
  0 siblings, 0 replies; 3+ messages in thread
From: InKi Dae @ 2009-04-10  1:06 UTC (permalink / raw)
  To: Kyungmin Park; +Cc: ben-linux, linux-fbdev-devel, linux-kernel, kyungmin.park

Thank you Kyungmin,

Signed-off-by: InKi Dae <daeinki@gmail.com, inki.dae@samsung.com>

2009/4/10 Kyungmin Park <kmpark@infradead.org>:
> Hi,
>
> On Thu, Apr 9, 2009 at 12:59 AM, InKi Dae <daeinki@gmail.com> wrote:
>> This patch supports ARGB1888 and ARGB4888 for Samsung SoC Framebuffer
>> driver. (s3c-fb.c)
>> I tested and is working fine.
>>
>> If this patch has any problem, please let me know.
>> I'll look forward to applying to mainline.
>>
>> Thank you,
>> InKi Dae.
>
> Please give you signed-off-by here and more descriptions
>
>>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
>> index e0e7899..55d2298 100644
>> --- a/drivers/video/s3c-fb.c
>> +++ b/drivers/video/s3c-fb.c
>> @@ -358,9 +358,16 @@ static int s3c_fb_set_par(struct fb_info *info)
>>  writel(data, regs + VIDOSD_B(win_no));
>>
>>  data = var->xres * var->yres;
>> +
>> + u32 osdc_data = 0;
>> +
>> + osdc_data = VIDISD14C_ALPHA1_R(0xf) |
>> +  VIDISD14C_ALPHA1_G(0xf) |
>> +  VIDISD14C_ALPHA1_B(0xf);
>> +
>>  if (s3c_fb_has_osd_d(win_no)) {
>>   writel(data, regs + VIDOSD_D(win_no));
>> -  writel(0, regs + VIDOSD_C(win_no));
>> +  writel(osdc_data, regs + VIDOSD_C(win_no));
>>  } else
>>   writel(data, regs + VIDOSD_C(win_no));
>>
>> @@ -409,8 +416,12 @@ static int s3c_fb_set_par(struct fb_info *info)
>>     data |= WINCON1_BPPMODE_19BPP_A1666;
>>    else
>>     data |= WINCON1_BPPMODE_18BPP_666;
>> -  } else if (var->transp.length != 0)
>> -   data |= WINCON1_BPPMODE_25BPP_A1888;
>> +  } else if (var->transp.length == 1)
>> +   data |= WINCON1_BPPMODE_25BPP_A1888
>> +    | WINCON1_BLD_PIX;
>> +  else if (var->transp.length == 4)
>> +   data |= WINCON1_BPPMODE_28BPP_A4888
>> +    | WINCON1_BLD_PIX | WINCON1_ALPHA_SEL;
>>   else
>>    data |= WINCON0_BPPMODE_24BPP_888;
>>
>> @@ -418,6 +429,20 @@ static int s3c_fb_set_par(struct fb_info *info)
>>   break;
>>  }
>>
>> + /* It has no color key control register for window0 */
>> + if (win_no > 0) {
>> +  u32 keycon0_data = 0, keycon1_data = 0;
>> +
>> +  keycon0_data = ~(WxKEYCON0_KEYBL_EN |
>> +    WxKEYCON0_KEYEN_F |
>> +    WxKEYCON0_DIRCON) | WxKEYCON0_COMPKEY(0);
>> +
>> +  keycon1_data = WxKEYCON1_COLVAL(0xffffff);
>> +
>> +  writel(keycon0_data, regs + WxKEYCONy(win_no-1, 0));
>> +  writel(keycon1_data, regs + WxKEYCONy(win_no-1, 1));
>> + }
>> +
>>  writel(data, regs + WINCON(win_no));
>>  writel(0x0, regs + WINxMAP(win_no));
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-10  1:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-09  7:59 It has added ARGB1888 and ARGB4888 features to Samsung SoC Framebuffer driver InKi Dae
2009-04-09 16:59 ` Kyungmin Park
2009-04-10  1:06   ` InKi Dae

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).