* [PATCH] OMAPDSS: OMAPFB: always allow to configure overlay
@ 2012-05-04 15:16 Grazvydas Ignotas
2012-05-10 10:28 ` Tomi Valkeinen
2012-05-10 10:58 ` Grazvydas Ignotas
0 siblings, 2 replies; 3+ messages in thread
From: Grazvydas Ignotas @ 2012-05-04 15:16 UTC (permalink / raw)
To: linux-fbdev
Currently when multiple overlays are active, OMAPFB_SETUP_PLANE fails.
Instead of failing, allow it to configure the first overlay as if there
was only one overlay, the remaining ones will have to be configured in
other ways (sysfs).
This allows overlay-controlling programs (like video players) to function
properly when framebuffer is cloned to another display (like TV).
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
drivers/video/omap2/omapfb/omapfb-ioctl.c | 36 ++++++++++------------------
1 files changed, 13 insertions(+), 23 deletions(-)
diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
index 6a09ef8..58b7f2d 100644
--- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
+++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
@@ -70,11 +70,6 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
DBG("omapfb_setup_plane\n");
- if (ofbi->num_overlays != 1) {
- r = -EINVAL;
- goto out;
- }
-
/* XXX uses only the first overlay */
ovl = ofbi->overlays[0];
@@ -184,25 +179,20 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
static int omapfb_query_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
{
struct omapfb_info *ofbi = FB2OFB(fbi);
+ struct omap_overlay *ovl;
+ struct omap_overlay_info ovli;
- if (ofbi->num_overlays != 1) {
- memset(pi, 0, sizeof(*pi));
- } else {
- struct omap_overlay *ovl;
- struct omap_overlay_info ovli;
-
- ovl = ofbi->overlays[0];
- ovl->get_overlay_info(ovl, &ovli);
-
- pi->pos_x = ovli.pos_x;
- pi->pos_y = ovli.pos_y;
- pi->enabled = ovl->is_enabled(ovl);
- pi->channel_out = 0; /* xxx */
- pi->mirror = 0;
- pi->mem_idx = get_mem_idx(ofbi);
- pi->out_width = ovli.out_width;
- pi->out_height = ovli.out_height;
- }
+ ovl = ofbi->overlays[0];
+ ovl->get_overlay_info(ovl, &ovli);
+
+ pi->pos_x = ovli.pos_x;
+ pi->pos_y = ovli.pos_y;
+ pi->enabled = ovl->is_enabled(ovl);
+ pi->channel_out = 0; /* xxx */
+ pi->mirror = 0;
+ pi->mem_idx = get_mem_idx(ofbi);
+ pi->out_width = ovli.out_width;
+ pi->out_height = ovli.out_height;
return 0;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] OMAPDSS: OMAPFB: always allow to configure overlay
2012-05-04 15:16 [PATCH] OMAPDSS: OMAPFB: always allow to configure overlay Grazvydas Ignotas
@ 2012-05-10 10:28 ` Tomi Valkeinen
2012-05-10 10:58 ` Grazvydas Ignotas
1 sibling, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2012-05-10 10:28 UTC (permalink / raw)
To: linux-fbdev
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
On Fri, 2012-05-04 at 18:16 +0300, Grazvydas Ignotas wrote:
> Currently when multiple overlays are active, OMAPFB_SETUP_PLANE fails.
> Instead of failing, allow it to configure the first overlay as if there
> was only one overlay, the remaining ones will have to be configured in
> other ways (sysfs).
>
> This allows overlay-controlling programs (like video players) to function
> properly when framebuffer is cloned to another display (like TV).
>
> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
> ---
> drivers/video/omap2/omapfb/omapfb-ioctl.c | 36 ++++++++++------------------
> 1 files changed, 13 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
> index 6a09ef8..58b7f2d 100644
> --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
> +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
> @@ -70,11 +70,6 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
>
> DBG("omapfb_setup_plane\n");
>
> - if (ofbi->num_overlays != 1) {
> - r = -EINVAL;
> - goto out;
> - }
> -
> /* XXX uses only the first overlay */
> ovl = ofbi->overlays[0];
What if there are no overlays? I'm not quite sure about it, but I think
it's possible.
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] OMAPDSS: OMAPFB: always allow to configure overlay
2012-05-04 15:16 [PATCH] OMAPDSS: OMAPFB: always allow to configure overlay Grazvydas Ignotas
2012-05-10 10:28 ` Tomi Valkeinen
@ 2012-05-10 10:58 ` Grazvydas Ignotas
1 sibling, 0 replies; 3+ messages in thread
From: Grazvydas Ignotas @ 2012-05-10 10:58 UTC (permalink / raw)
To: linux-fbdev
On Thu, May 10, 2012 at 1:28 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On Fri, 2012-05-04 at 18:16 +0300, Grazvydas Ignotas wrote:
>> Currently when multiple overlays are active, OMAPFB_SETUP_PLANE fails.
>> Instead of failing, allow it to configure the first overlay as if there
>> was only one overlay, the remaining ones will have to be configured in
>> other ways (sysfs).
>>
>> This allows overlay-controlling programs (like video players) to function
>> properly when framebuffer is cloned to another display (like TV).
>>
>> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
>> ---
>> drivers/video/omap2/omapfb/omapfb-ioctl.c | 36 ++++++++++------------------
>> 1 files changed, 13 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c
>> index 6a09ef8..58b7f2d 100644
>> --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c
>> +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c
>> @@ -70,11 +70,6 @@ static int omapfb_setup_plane(struct fb_info *fbi, struct omapfb_plane_info *pi)
>>
>> DBG("omapfb_setup_plane\n");
>>
>> - if (ofbi->num_overlays != 1) {
>> - r = -EINVAL;
>> - goto out;
>> - }
>> -
>> /* XXX uses only the first overlay */
>> ovl = ofbi->overlays[0];
>
> What if there are no overlays? I'm not quite sure about it, but I think
> it's possible.
Hmm, I guess you are right, will send v2.
--
Gražvydas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-10 10:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-04 15:16 [PATCH] OMAPDSS: OMAPFB: always allow to configure overlay Grazvydas Ignotas
2012-05-10 10:28 ` Tomi Valkeinen
2012-05-10 10:58 ` Grazvydas Ignotas
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).