* [PATCH] enabled alpha blender for OMAP2/3 DSS2 driver.
@ 2009-04-24 9:13 InKi Dae
2009-04-24 13:46 ` Kevin Hilman
0 siblings, 1 reply; 4+ messages in thread
From: InKi Dae @ 2009-04-24 9:13 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap
- Added global alpha value for GFX and VIDEO2 layer.
- Modified dispc_alpha_blending_enabled function.
-> for OMAP_DSS_CHANNEL_DIGIT, it has to get DISPC_CONFIG[19], not 18.
For alpha channel, dispc_enable_alpha_blending() is called by
omapfb_fb_init() in case of only XXX_ARGB16, RGBA32 or ARGB32
Signed-off-by: InKi Dae <inki.dae@samsung.com>
--
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 9bab6cf..c5335e5 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1846,8 +1846,10 @@ void dispc_enable_trans_key(enum omap_channel
ch, bool enable)
enable_clocks(1);
if (ch == OMAP_DSS_CHANNEL_LCD)
REG_FLD_MOD(DISPC_CONFIG, enable, 10, 10);
- else /* OMAP_DSS_CHANNEL_DIGIT */
+ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
REG_FLD_MOD(DISPC_CONFIG, enable, 12, 12);
+ else
+ BUG();
enable_clocks(0);
}
void dispc_enable_alpha_blending(enum omap_channel ch, bool enable)
@@ -1855,8 +1857,10 @@ void dispc_enable_alpha_blending(enum
omap_channel ch, bool enable)
enable_clocks(1);
if (ch == OMAP_DSS_CHANNEL_LCD)
REG_FLD_MOD(DISPC_CONFIG, enable, 18, 18);
- else /* OMAP_DSS_CHANNEL_DIGIT */
+ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
REG_FLD_MOD(DISPC_CONFIG, enable, 19, 19);
+ else
+ BUG();
enable_clocks(0);
}
bool dispc_alpha_blending_enabled(enum omap_channel ch)
@@ -1867,7 +1871,7 @@ bool dispc_alpha_blending_enabled(enum omap_channel ch)
if (ch == OMAP_DSS_CHANNEL_LCD)
enabled = REG_GET(DISPC_CONFIG, 18, 18);
else if (ch == OMAP_DSS_CHANNEL_DIGIT)
- enabled = REG_GET(DISPC_CONFIG, 18, 18);
+ enabled = REG_GET(DISPC_CONFIG, 19, 19);
else
BUG();
enable_clocks(0);
@@ -1876,6 +1880,18 @@ bool dispc_alpha_blending_enabled(enum omap_channel ch)
}
+void dispc_set_global_alpha(int layer, int alpha)
+{
+ enable_clocks(1);
+ if (layer == 0)
+ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, alpha, 7, 0);
+ else if (layer == 2)
+ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, alpha, 23, 16);
+ else
+ BUG();
+
+ enable_clocks(0);
+}
bool dispc_trans_key_enabled(enum omap_channel ch)
{
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c
b/drivers/video/omap2/omapfb/omapfb-main.c
index 76e7c6c..98cad35 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1583,6 +1583,17 @@ int omapfb_fb_init(struct omapfb2_device
*fbdev, struct fb_info *fbi)
r = mode;
goto err;
}
+
+ if (mode == OMAP_DSS_COLOR_ARGB16 ||
+ mode ==
OMAP_DSS_COLOR_RGBA32 ||
+ mode ==
OMAP_DSS_COLOR_ARGB32) {
+
+
dispc_enable_alpha_blending(OMAP_DSS_CHANNEL_LCD, 1);
+
+ /* Set global alpha value to
fully apaque */
+ dispc_set_global_alpha(id, 255);
+ }
+
r = dss_mode_to_fb_mode(mode, var);
if (r < 0)
goto err;
diff --git a/drivers/video/omap2/omapfb/omapfb.h
b/drivers/video/omap2/omapfb/omapfb.h
index 43f6922..56c303e 100644
--- a/drivers/video/omap2/omapfb/omapfb.h
+++ b/drivers/video/omap2/omapfb/omapfb.h
@@ -147,4 +147,8 @@ static inline int omapfb_overlay_enable(struct
omap_overlay *ovl,
return ovl->set_overlay_info(ovl, &info);
}
+extern void dispc_enable_alpha_blending(enum omap_channel ch,
+ int enable);
+extern void dispc_set_global_alpha(int layer, int alpha);
+
#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-omap"
in the body of a message to majordomo@vger.kernel.org More majordomo
info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] enabled alpha blender for OMAP2/3 DSS2 driver.
2009-04-24 9:13 [PATCH] enabled alpha blender for OMAP2/3 DSS2 driver InKi Dae
@ 2009-04-24 13:46 ` Kevin Hilman
2009-04-25 16:00 ` InKi Dae
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2009-04-24 13:46 UTC (permalink / raw)
To: InKi Dae; +Cc: Tomi Valkeinen, linux-omap
InKi Dae <daeinki@gmail.com> writes:
> - Added global alpha value for GFX and VIDEO2 layer.
> - Modified dispc_alpha_blending_enabled function.
> -> for OMAP_DSS_CHANNEL_DIGIT, it has to get DISPC_CONFIG[19], not 18.
>
> For alpha channel, dispc_enable_alpha_blending() is called by
> omapfb_fb_init() in case of only XXX_ARGB16, RGBA32 or ARGB32
>
> Signed-off-by: InKi Dae <inki.dae@samsung.com>
> --
> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> index 9bab6cf..c5335e5 100644
> --- a/drivers/video/omap2/dss/dispc.c
> +++ b/drivers/video/omap2/dss/dispc.c
> @@ -1846,8 +1846,10 @@ void dispc_enable_trans_key(enum omap_channel
> ch, bool enable)
> enable_clocks(1);
> if (ch == OMAP_DSS_CHANNEL_LCD)
> REG_FLD_MOD(DISPC_CONFIG, enable, 10, 10);
> - else /* OMAP_DSS_CHANNEL_DIGIT */
> + else if (ch == OMAP_DSS_CHANNEL_DIGIT)
> REG_FLD_MOD(DISPC_CONFIG, enable, 12, 12);
> + else
> + BUG();
BUG() will halt the whole kernel. I don't think you want to do that
for this issue. I think WARN() is more appropriate here and the other
cases in this patch as well.
Kevin
> enable_clocks(0);
> }
> void dispc_enable_alpha_blending(enum omap_channel ch, bool enable)
> @@ -1855,8 +1857,10 @@ void dispc_enable_alpha_blending(enum
> omap_channel ch, bool enable)
> enable_clocks(1);
> if (ch == OMAP_DSS_CHANNEL_LCD)
> REG_FLD_MOD(DISPC_CONFIG, enable, 18, 18);
> - else /* OMAP_DSS_CHANNEL_DIGIT */
> + else if (ch == OMAP_DSS_CHANNEL_DIGIT)
> REG_FLD_MOD(DISPC_CONFIG, enable, 19, 19);
> + else
> + BUG();
> enable_clocks(0);
> }
> bool dispc_alpha_blending_enabled(enum omap_channel ch)
> @@ -1867,7 +1871,7 @@ bool dispc_alpha_blending_enabled(enum omap_channel ch)
> if (ch == OMAP_DSS_CHANNEL_LCD)
> enabled = REG_GET(DISPC_CONFIG, 18, 18);
> else if (ch == OMAP_DSS_CHANNEL_DIGIT)
> - enabled = REG_GET(DISPC_CONFIG, 18, 18);
> + enabled = REG_GET(DISPC_CONFIG, 19, 19);
> else
> BUG();
> enable_clocks(0);
> @@ -1876,6 +1880,18 @@ bool dispc_alpha_blending_enabled(enum omap_channel ch)
>
> }
>
> +void dispc_set_global_alpha(int layer, int alpha)
> +{
> + enable_clocks(1);
> + if (layer == 0)
> + REG_FLD_MOD(DISPC_GLOBAL_ALPHA, alpha, 7, 0);
> + else if (layer == 2)
> + REG_FLD_MOD(DISPC_GLOBAL_ALPHA, alpha, 23, 16);
> + else
> + BUG();
> +
> + enable_clocks(0);
> +}
>
> bool dispc_trans_key_enabled(enum omap_channel ch)
> {
> diff --git a/drivers/video/omap2/omapfb/omapfb-main.c
> b/drivers/video/omap2/omapfb/omapfb-main.c
> index 76e7c6c..98cad35 100644
> --- a/drivers/video/omap2/omapfb/omapfb-main.c
> +++ b/drivers/video/omap2/omapfb/omapfb-main.c
> @@ -1583,6 +1583,17 @@ int omapfb_fb_init(struct omapfb2_device
> *fbdev, struct fb_info *fbi)
> r = mode;
> goto err;
> }
> +
> + if (mode == OMAP_DSS_COLOR_ARGB16 ||
> + mode ==
> OMAP_DSS_COLOR_RGBA32 ||
> + mode ==
> OMAP_DSS_COLOR_ARGB32) {
> +
> +
> dispc_enable_alpha_blending(OMAP_DSS_CHANNEL_LCD, 1);
> +
> + /* Set global alpha value to
> fully apaque */
> + dispc_set_global_alpha(id, 255);
> + }
> +
> r = dss_mode_to_fb_mode(mode, var);
> if (r < 0)
> goto err;
> diff --git a/drivers/video/omap2/omapfb/omapfb.h
> b/drivers/video/omap2/omapfb/omapfb.h
> index 43f6922..56c303e 100644
> --- a/drivers/video/omap2/omapfb/omapfb.h
> +++ b/drivers/video/omap2/omapfb/omapfb.h
> @@ -147,4 +147,8 @@ static inline int omapfb_overlay_enable(struct
> omap_overlay *ovl,
> return ovl->set_overlay_info(ovl, &info);
> }
>
> +extern void dispc_enable_alpha_blending(enum omap_channel ch,
> + int enable);
> +extern void dispc_set_global_alpha(int layer, int alpha);
> +
> #endif
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap"
> in the body of a message to majordomo@vger.kernel.org More majordomo
> info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] enabled alpha blender for OMAP2/3 DSS2 driver.
2009-04-24 13:46 ` Kevin Hilman
@ 2009-04-25 16:00 ` InKi Dae
2009-04-26 10:22 ` InKi Dae
0 siblings, 1 reply; 4+ messages in thread
From: InKi Dae @ 2009-04-25 16:00 UTC (permalink / raw)
To: Kevin Hilman; +Cc: Tomi Valkeinen, linux-omap
To use WARN() instead of BUG() is more appropriate.
it's my mistake. those functions aren't critical as BUG() is used.
Thank you Kevin.
2009/4/24 Kevin Hilman <khilman@deeprootsystems.com>:
> InKi Dae <daeinki@gmail.com> writes:
>
>> - Added global alpha value for GFX and VIDEO2 layer.
>> - Modified dispc_alpha_blending_enabled function.
>> -> for OMAP_DSS_CHANNEL_DIGIT, it has to get DISPC_CONFIG[19], not 18.
>>
>> For alpha channel, dispc_enable_alpha_blending() is called by
>> omapfb_fb_init() in case of only XXX_ARGB16, RGBA32 or ARGB32
>>
>> Signed-off-by: InKi Dae <inki.dae@samsung.com>
>> --
>> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
>> index 9bab6cf..c5335e5 100644
>> --- a/drivers/video/omap2/dss/dispc.c
>> +++ b/drivers/video/omap2/dss/dispc.c
>> @@ -1846,8 +1846,10 @@ void dispc_enable_trans_key(enum omap_channel
>> ch, bool enable)
>> enable_clocks(1);
>> if (ch == OMAP_DSS_CHANNEL_LCD)
>> REG_FLD_MOD(DISPC_CONFIG, enable, 10, 10);
>> - else /* OMAP_DSS_CHANNEL_DIGIT */
>> + else if (ch == OMAP_DSS_CHANNEL_DIGIT)
>> REG_FLD_MOD(DISPC_CONFIG, enable, 12, 12);
>> + else
>> + BUG();
>
> BUG() will halt the whole kernel. I don't think you want to do that
> for this issue. I think WARN() is more appropriate here and the other
> cases in this patch as well.
>
> Kevin
>
>> enable_clocks(0);
>> }
>> void dispc_enable_alpha_blending(enum omap_channel ch, bool enable)
>> @@ -1855,8 +1857,10 @@ void dispc_enable_alpha_blending(enum
>> omap_channel ch, bool enable)
>> enable_clocks(1);
>> if (ch == OMAP_DSS_CHANNEL_LCD)
>> REG_FLD_MOD(DISPC_CONFIG, enable, 18, 18);
>> - else /* OMAP_DSS_CHANNEL_DIGIT */
>> + else if (ch == OMAP_DSS_CHANNEL_DIGIT)
>> REG_FLD_MOD(DISPC_CONFIG, enable, 19, 19);
>> + else
>> + BUG();
>> enable_clocks(0);
>> }
>> bool dispc_alpha_blending_enabled(enum omap_channel ch)
>> @@ -1867,7 +1871,7 @@ bool dispc_alpha_blending_enabled(enum omap_channel ch)
>> if (ch == OMAP_DSS_CHANNEL_LCD)
>> enabled = REG_GET(DISPC_CONFIG, 18, 18);
>> else if (ch == OMAP_DSS_CHANNEL_DIGIT)
>> - enabled = REG_GET(DISPC_CONFIG, 18, 18);
>> + enabled = REG_GET(DISPC_CONFIG, 19, 19);
>> else
>> BUG();
>> enable_clocks(0);
>> @@ -1876,6 +1880,18 @@ bool dispc_alpha_blending_enabled(enum omap_channel ch)
>>
>> }
>>
>> +void dispc_set_global_alpha(int layer, int alpha)
>> +{
>> + enable_clocks(1);
>> + if (layer == 0)
>> + REG_FLD_MOD(DISPC_GLOBAL_ALPHA, alpha, 7, 0);
>> + else if (layer == 2)
>> + REG_FLD_MOD(DISPC_GLOBAL_ALPHA, alpha, 23, 16);
>> + else
>> + BUG();
>> +
>> + enable_clocks(0);
>> +}
>>
>> bool dispc_trans_key_enabled(enum omap_channel ch)
>> {
>> diff --git a/drivers/video/omap2/omapfb/omapfb-main.c
>> b/drivers/video/omap2/omapfb/omapfb-main.c
>> index 76e7c6c..98cad35 100644
>> --- a/drivers/video/omap2/omapfb/omapfb-main.c
>> +++ b/drivers/video/omap2/omapfb/omapfb-main.c
>> @@ -1583,6 +1583,17 @@ int omapfb_fb_init(struct omapfb2_device
>> *fbdev, struct fb_info *fbi)
>> r = mode;
>> goto err;
>> }
>> +
>> + if (mode == OMAP_DSS_COLOR_ARGB16 ||
>> + mode ==
>> OMAP_DSS_COLOR_RGBA32 ||
>> + mode ==
>> OMAP_DSS_COLOR_ARGB32) {
>> +
>> +
>> dispc_enable_alpha_blending(OMAP_DSS_CHANNEL_LCD, 1);
>> +
>> + /* Set global alpha value to
>> fully apaque */
>> + dispc_set_global_alpha(id, 255);
>> + }
>> +
>> r = dss_mode_to_fb_mode(mode, var);
>> if (r < 0)
>> goto err;
>> diff --git a/drivers/video/omap2/omapfb/omapfb.h
>> b/drivers/video/omap2/omapfb/omapfb.h
>> index 43f6922..56c303e 100644
>> --- a/drivers/video/omap2/omapfb/omapfb.h
>> +++ b/drivers/video/omap2/omapfb/omapfb.h
>> @@ -147,4 +147,8 @@ static inline int omapfb_overlay_enable(struct
>> omap_overlay *ovl,
>> return ovl->set_overlay_info(ovl, &info);
>> }
>>
>> +extern void dispc_enable_alpha_blending(enum omap_channel ch,
>> + int enable);
>> +extern void dispc_set_global_alpha(int layer, int alpha);
>> +
>> #endif
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap"
>> in the body of a message to majordomo@vger.kernel.org More majordomo
>> info at http://vger.kernel.org/majordomo-info.html
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] enabled alpha blender for OMAP2/3 DSS2 driver.
2009-04-25 16:00 ` InKi Dae
@ 2009-04-26 10:22 ` InKi Dae
0 siblings, 0 replies; 4+ messages in thread
From: InKi Dae @ 2009-04-26 10:22 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: linux-omap
I am sending second alpha blending patch for DSS2 driver written by
Tomi Valkeinen.
In previous patch, I called functions for alpha channel from
omapfb_fb_init() of omapfb-main.c directly.
This patch is called by manager.
preliminary to call, those functions are registered in manager and
then omapfb_fb_init() just calls functions registered in manager.
Also, I think that omap_dss_mgr_enable_alpha_blending() of dispc.c
should be modified appropriately.
1. struct omap_overlay_manager must to have enum omap_channel as his member.
2. some way for confirming omap_channel should be added in
omap_dss_mgr_enable_alpha_blending().
signed-off-by: InKi Dae <inki.dae@samsung.com>
--
diff --git a/arch/arm/plat-omap/include/mach/display.h
b/arch/arm/plat-omap/include/mach/display.h
index d0b4c83..3c24b64 100644
--- a/arch/arm/plat-omap/include/mach/display.h
+++ b/arch/arm/plat-omap/include/mach/display.h
@@ -425,6 +425,8 @@ struct omap_overlay_manager {
u32 trans_key);
void (*enable_trans_key)(struct omap_overlay_manager *mgr,
bool enable);
+ void (*set_global_alpha)(struct omap_overlay_manager *mgr,
+ u8 value);
void (*enable_alpha_blending)(struct omap_overlay_manager *mgr,
bool enable);
};
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 9bab6cf..e7bdd90 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1846,7 +1846,7 @@ void dispc_enable_trans_key(enum omap_channel
ch, bool enable)
enable_clocks(1);
if (ch == OMAP_DSS_CHANNEL_LCD)
REG_FLD_MOD(DISPC_CONFIG, enable, 10, 10);
- else /* OMAP_DSS_CHANNEL_DIGIT */
+ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
REG_FLD_MOD(DISPC_CONFIG, enable, 12, 12);
enable_clocks(0);
}
@@ -1855,27 +1855,34 @@ void dispc_enable_alpha_blending(enum
omap_channel ch, bool enable)
enable_clocks(1);
if (ch == OMAP_DSS_CHANNEL_LCD)
REG_FLD_MOD(DISPC_CONFIG, enable, 18, 18);
- else /* OMAP_DSS_CHANNEL_DIGIT */
+ else if (ch == OMAP_DSS_CHANNEL_DIGIT)
REG_FLD_MOD(DISPC_CONFIG, enable, 19, 19);
enable_clocks(0);
}
bool dispc_alpha_blending_enabled(enum omap_channel ch)
{
- bool enabled;
+ bool enabled = 0;
enable_clocks(1);
if (ch == OMAP_DSS_CHANNEL_LCD)
enabled = REG_GET(DISPC_CONFIG, 18, 18);
else if (ch == OMAP_DSS_CHANNEL_DIGIT)
- enabled = REG_GET(DISPC_CONFIG, 18, 18);
- else
- BUG();
+ enabled = REG_GET(DISPC_CONFIG, 19, 19);
enable_clocks(0);
return enabled;
}
+void dispc_set_global_alpha(int layer, u8 value)
+{
+ enable_clocks(1);
+ if (layer == 0)
+ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, value, 7, 0);
+ else if (layer == 2)
+ REG_FLD_MOD(DISPC_GLOBAL_ALPHA, value, 23, 16);
+ enable_clocks(0);
+}
bool dispc_trans_key_enabled(enum omap_channel ch)
{
diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
index 1d01ff6..8c0f114 100644
--- a/drivers/video/omap2/dss/dss.h
+++ b/drivers/video/omap2/dss/dss.h
@@ -294,6 +294,7 @@ void dispc_get_trans_key(enum omap_channel ch,
enum omap_dss_color_key_type *type,
u32 *trans_key);
void dispc_enable_trans_key(enum omap_channel ch, bool enable);
+void dispc_set_global_alpha(int layer, u8 value);
void dispc_enable_alpha_blending(enum omap_channel ch, bool enable);
bool dispc_trans_key_enabled(enum omap_channel ch);
bool dispc_alpha_blending_enabled(enum omap_channel ch);
diff --git a/drivers/video/omap2/dss/manager.c
b/drivers/video/omap2/dss/manager.c
index bf059e0..810afea 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -545,10 +545,22 @@ static void omap_dss_mgr_enable_trans_key(struct
omap_overlay_manager *mgr,
{
dispc_enable_trans_key(mgr->id, enable);
}
+static void omap_dss_mgr_set_global_alpha(struct omap_overlay_manager
*mgr, u8 value)
+{
+ dispc_set_global_alpha(mgr->id, value);
+}
static void omap_dss_mgr_enable_alpha_blending(struct
omap_overlay_manager *mgr,
bool enable)
{
- dispc_enable_alpha_blending(mgr->id, enable);
+ /*
+ * This line should be modified.
+ * I think that the way for confirming omap_channel must be added.
+ * and struct omap_overlay_manager needs to have omap_channel as his member.
+ */
+ int ch;
+ ch = OMAP_DSS_CHANNEL_LCD;
+
+ dispc_enable_alpha_blending(ch, enable);
}
static bool omap_dss_mgr_get_alpha_blending_status(
struct omap_overlay_manager *mgr)
@@ -609,6 +621,7 @@ int dss_init_overlay_managers(struct platform_device *pdev)
&omap_dss_mgr_get_trans_key_type_and_value;
mgr->enable_trans_key = &omap_dss_mgr_enable_trans_key;
mgr->get_trans_key_status = &omap_dss_mgr_get_trans_key_status;
+ mgr->set_global_alpha = &omap_dss_mgr_set_global_alpha;
mgr->enable_alpha_blending =
&omap_dss_mgr_enable_alpha_blending;
mgr->get_alpha_blending_status =
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c
b/drivers/video/omap2/omapfb/omapfb-main.c
index 76e7c6c..99888b0 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1583,6 +1583,22 @@ int omapfb_fb_init(struct omapfb2_device
*fbdev, struct fb_info *fbi)
r = mode;
goto err;
}
+
+ if (mode == OMAP_DSS_COLOR_ARGB16 ||
+ mode == OMAP_DSS_COLOR_RGBA32 ||
+ mode == OMAP_DSS_COLOR_ARGB32) {
+ struct omap_overlay *ovl;
+
+ ovl = omap_dss_get_overlay(id);
+
+ if (ovl->manager->enable_alpha_blending)
+ ovl->manager->enable_alpha_blending(ovl->manager, 1);
+
+ /* Set global alpha value to fully apaque */
+ if (ovl->manager->set_global_alpha)
+ ovl->manager->set_global_alpha(ovl->manager, 255);
+ }
+
r = dss_mode_to_fb_mode(mode, var);
if (r < 0)
goto err;
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-26 10:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-24 9:13 [PATCH] enabled alpha blender for OMAP2/3 DSS2 driver InKi Dae
2009-04-24 13:46 ` Kevin Hilman
2009-04-25 16:00 ` InKi Dae
2009-04-26 10:22 ` InKi Dae
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox