* [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0.
@ 2016-04-04 15:47 Marius Vlad
2016-04-04 15:53 ` Lionel Landwerlin
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Marius Vlad @ 2016-04-04 15:47 UTC (permalink / raw)
To: intel-gfx
igt_atomic_prepare_plane_commit() assumes that the framebuffer is always
set-up.
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
lib/igt_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 82257a6..30c5b7e 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_output_t *output,
igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id);
}
- if (plane->position_changed || plane->size_changed) {
+ if ((plane->position_changed || plane->size_changed) && fb_id != 0) {
uint32_t src_x = IGT_FIXED(plane->fb->src_x, 0); /* src_x */
uint32_t src_y = IGT_FIXED(plane->fb->src_y, 0); /* src_y */
uint32_t src_w = IGT_FIXED(plane->fb->src_w, 0); /* src_w */
--
2.5.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0.
2016-04-04 15:47 [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0 Marius Vlad
@ 2016-04-04 15:53 ` Lionel Landwerlin
2016-04-04 16:05 ` Ville Syrjälä
2016-04-05 8:46 ` Maarten Lankhorst
2 siblings, 0 replies; 6+ messages in thread
From: Lionel Landwerlin @ 2016-04-04 15:53 UTC (permalink / raw)
To: Marius Vlad, intel-gfx
Hi Marius,
Thanks for this. I have the same patch on a branch I haven't send yet
(oops).
In my patch I implemented this by setting src_* to 0 if fb_id == 0.
I'm not sure what makes more sense but anyway :
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
On 04/04/16 16:47, Marius Vlad wrote:
> igt_atomic_prepare_plane_commit() assumes that the framebuffer is always
> set-up.
>
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
> lib/igt_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 82257a6..30c5b7e 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_output_t *output,
> igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id);
> }
>
> - if (plane->position_changed || plane->size_changed) {
> + if ((plane->position_changed || plane->size_changed) && fb_id != 0) {
> uint32_t src_x = IGT_FIXED(plane->fb->src_x, 0); /* src_x */
> uint32_t src_y = IGT_FIXED(plane->fb->src_y, 0); /* src_y */
> uint32_t src_w = IGT_FIXED(plane->fb->src_w, 0); /* src_w */
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0.
2016-04-04 15:47 [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0 Marius Vlad
2016-04-04 15:53 ` Lionel Landwerlin
@ 2016-04-04 16:05 ` Ville Syrjälä
2016-04-05 8:46 ` Maarten Lankhorst
2 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjälä @ 2016-04-04 16:05 UTC (permalink / raw)
To: Marius Vlad; +Cc: intel-gfx
On Mon, Apr 04, 2016 at 06:47:25PM +0300, Marius Vlad wrote:
> igt_atomic_prepare_plane_commit() assumes that the framebuffer is always
> set-up.
>
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
> lib/igt_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 82257a6..30c5b7e 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_output_t *output,
> igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id);
> }
>
> - if (plane->position_changed || plane->size_changed) {
> + if ((plane->position_changed || plane->size_changed) && fb_id != 0) {
> uint32_t src_x = IGT_FIXED(plane->fb->src_x, 0); /* src_x */
> uint32_t src_y = IGT_FIXED(plane->fb->src_y, 0); /* src_y */
> uint32_t src_w = IGT_FIXED(plane->fb->src_w, 0); /* src_w */
Someone should really move the src coordinates from the fb into the plane.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0.
2016-04-04 15:47 [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0 Marius Vlad
2016-04-04 15:53 ` Lionel Landwerlin
2016-04-04 16:05 ` Ville Syrjälä
@ 2016-04-05 8:46 ` Maarten Lankhorst
2016-04-05 10:29 ` Marius Vlad
2 siblings, 1 reply; 6+ messages in thread
From: Maarten Lankhorst @ 2016-04-05 8:46 UTC (permalink / raw)
To: Marius Vlad, intel-gfx
Op 04-04-16 om 17:47 schreef Marius Vlad:
> igt_atomic_prepare_plane_commit() assumes that the framebuffer is always
> set-up.
>
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
> lib/igt_kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 82257a6..30c5b7e 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_output_t *output,
> igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id);
> }
>
> - if (plane->position_changed || plane->size_changed) {
> + if ((plane->position_changed || plane->size_changed) && fb_id != 0) {
> uint32_t src_x = IGT_FIXED(plane->fb->src_x, 0); /* src_x */
> uint32_t src_y = IGT_FIXED(plane->fb->src_y, 0); /* src_y */
> uint32_t src_w = IGT_FIXED(plane->fb->src_w, 0); /* src_w */
Why is this needed?
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0.
2016-04-05 8:46 ` Maarten Lankhorst
@ 2016-04-05 10:29 ` Marius Vlad
2016-04-05 10:58 ` Maarten Lankhorst
0 siblings, 1 reply; 6+ messages in thread
From: Marius Vlad @ 2016-04-05 10:29 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1174 bytes --]
On Tue, Apr 05, 2016 at 10:46:37AM +0200, Maarten Lankhorst wrote:
> Op 04-04-16 om 17:47 schreef Marius Vlad:
> > igt_atomic_prepare_plane_commit() assumes that the framebuffer is always
> > set-up.
> >
> > Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> > ---
> > lib/igt_kms.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> > index 82257a6..30c5b7e 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_output_t *output,
> > igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id);
> > }
> >
> > - if (plane->position_changed || plane->size_changed) {
> > + if ((plane->position_changed || plane->size_changed) && fb_id != 0) {
> > uint32_t src_x = IGT_FIXED(plane->fb->src_x, 0); /* src_x */
> > uint32_t src_y = IGT_FIXED(plane->fb->src_y, 0); /* src_y */
> > uint32_t src_w = IGT_FIXED(plane->fb->src_w, 0); /* src_w */
> Why is this needed?
Because plane->fb is NULL when fb_id == 0. Maybe Ville had a point, not having
src_* in plane->fb.
>
> ~Maarten
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0.
2016-04-05 10:29 ` Marius Vlad
@ 2016-04-05 10:58 ` Maarten Lankhorst
0 siblings, 0 replies; 6+ messages in thread
From: Maarten Lankhorst @ 2016-04-05 10:58 UTC (permalink / raw)
To: Marius Vlad; +Cc: intel-gfx
Op 05-04-16 om 12:29 schreef Marius Vlad:
> On Tue, Apr 05, 2016 at 10:46:37AM +0200, Maarten Lankhorst wrote:
>> Op 04-04-16 om 17:47 schreef Marius Vlad:
>>> igt_atomic_prepare_plane_commit() assumes that the framebuffer is always
>>> set-up.
>>>
>>> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
>>> ---
>>> lib/igt_kms.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>>> index 82257a6..30c5b7e 100644
>>> --- a/lib/igt_kms.c
>>> +++ b/lib/igt_kms.c
>>> @@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_output_t *output,
>>> igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id);
>>> }
>>>
>>> - if (plane->position_changed || plane->size_changed) {
>>> + if ((plane->position_changed || plane->size_changed) && fb_id != 0) {
>>> uint32_t src_x = IGT_FIXED(plane->fb->src_x, 0); /* src_x */
>>> uint32_t src_y = IGT_FIXED(plane->fb->src_y, 0); /* src_y */
>>> uint32_t src_w = IGT_FIXED(plane->fb->src_w, 0); /* src_w */
>> Why is this needed?
> Because plane->fb is NULL when fb_id == 0. Maybe Ville had a point, not having
> src_* in plane->fb.
>
Indeed, it's a property of the plane, not the fb.
You could put the same fb on multiple planes with different src parameters. :)
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-05 10:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-04 15:47 [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0 Marius Vlad
2016-04-04 15:53 ` Lionel Landwerlin
2016-04-04 16:05 ` Ville Syrjälä
2016-04-05 8:46 ` Maarten Lankhorst
2016-04-05 10:29 ` Marius Vlad
2016-04-05 10:58 ` Maarten Lankhorst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox