* [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4
@ 2020-05-23 3:49 chenxb_99091
2020-05-25 14:34 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: chenxb_99091 @ 2020-05-23 3:49 UTC (permalink / raw)
To: David Airlie; +Cc: linux-kernel, dri-devel, Xuebing Chen
From: Xuebing Chen <chenxb_99091@126.com>
The <include/drm/drm_crtc.h> provides drm_for_each_plane_mask macro and
plane_mask is defined as bitmask of plane indices, such as
1<<drm_plane_index(plane). This patch fixes error setting of plane_mask
in pan_display_atomic() function.
Signed-off-by: Xuebing Chen <chenxb_99091@126.com>
---
drivers/gpu/drm/drm_fb_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index e449f22..6a9f7ee 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1256,7 +1256,7 @@ retry:
goto fail;
plane = mode_set->crtc->primary;
- plane_mask |= drm_plane_index(plane);
+ plane_mask |= 1 << drm_plane_index(plane);
plane->old_fb = plane->fb;
}
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4
2020-05-23 3:49 [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4 chenxb_99091
@ 2020-05-25 14:34 ` Daniel Vetter
2020-05-25 14:56 ` Ville Syrjälä
2020-05-26 2:56 ` chenxb_99091
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Vetter @ 2020-05-25 14:34 UTC (permalink / raw)
To: chenxb_99091; +Cc: David Airlie, linux-kernel, dri-devel
On Sat, May 23, 2020 at 11:49:07AM +0800, chenxb_99091@126.com wrote:
> From: Xuebing Chen <chenxb_99091@126.com>
>
> The <include/drm/drm_crtc.h> provides drm_for_each_plane_mask macro and
> plane_mask is defined as bitmask of plane indices, such as
> 1<<drm_plane_index(plane). This patch fixes error setting of plane_mask
> in pan_display_atomic() function.
>
> Signed-off-by: Xuebing Chen <chenxb_99091@126.com>
What kernel is this patch against? Latest upstream doesn't have any such
code anymore ... I'm assuming that Ville fixed this in one of his patches,
but I can't find the right one just now.
-Daniel
> ---
> drivers/gpu/drm/drm_fb_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index e449f22..6a9f7ee 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1256,7 +1256,7 @@ retry:
> goto fail;
>
> plane = mode_set->crtc->primary;
> - plane_mask |= drm_plane_index(plane);
> + plane_mask |= 1 << drm_plane_index(plane);
> plane->old_fb = plane->fb;
> }
>
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4
2020-05-25 14:34 ` Daniel Vetter
@ 2020-05-25 14:56 ` Ville Syrjälä
2020-05-26 2:56 ` chenxb_99091
1 sibling, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2020-05-25 14:56 UTC (permalink / raw)
To: chenxb_99091, David Airlie, linux-kernel, dri-devel
On Mon, May 25, 2020 at 04:34:28PM +0200, Daniel Vetter wrote:
> On Sat, May 23, 2020 at 11:49:07AM +0800, chenxb_99091@126.com wrote:
> > From: Xuebing Chen <chenxb_99091@126.com>
> >
> > The <include/drm/drm_crtc.h> provides drm_for_each_plane_mask macro and
> > plane_mask is defined as bitmask of plane indices, such as
> > 1<<drm_plane_index(plane). This patch fixes error setting of plane_mask
> > in pan_display_atomic() function.
> >
> > Signed-off-by: Xuebing Chen <chenxb_99091@126.com>
>
> What kernel is this patch against? Latest upstream doesn't have any such
> code anymore ... I'm assuming that Ville fixed this in one of his patches,
> but I can't find the right one just now.
Looks to be gone in
commit e00fb8564ee9 ("drm: Stop updating plane->crtc/fb/old_fb on
atomic drivers"), in 2018.
Also seems this 1<< bug was already fixed in
commit 7118fd9bd975 ("drm/fb-helper: Use proper plane mask for fb
cleanup") ... in 2015!
Might be a good idea to invest in an upgrade if you're still using
such old kernel releases.
> -Daniel
>
> > ---
> > drivers/gpu/drm/drm_fb_helper.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > index e449f22..6a9f7ee 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -1256,7 +1256,7 @@ retry:
> > goto fail;
> >
> > plane = mode_set->crtc->primary;
> > - plane_mask |= drm_plane_index(plane);
> > + plane_mask |= 1 << drm_plane_index(plane);
> > plane->old_fb = plane->fb;
> > }
> >
> > --
> > 2.7.4
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re:Re: [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4
2020-05-25 14:34 ` Daniel Vetter
2020-05-25 14:56 ` Ville Syrjälä
@ 2020-05-26 2:56 ` chenxb_99091
1 sibling, 0 replies; 4+ messages in thread
From: chenxb_99091 @ 2020-05-26 2:56 UTC (permalink / raw)
To: Daniel Vetter; +Cc: David Airlie, linux-kernel, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 2024 bytes --]
--
发自我的网易邮箱手机智能版
<br/><br/><br/>
----- Original Message -----
From: "Daniel Vetter" <daniel@ffwll.ch>
To: chenxb_99091@126.com
Cc: "David Airlie" <airlied@linux.ie>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Sent: Mon, 25 May 2020 16:34:28 +0200
Subject: Re: [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4
>On Sat, May 23, 2020 at 11:49:07AM +0800, chenxb_99091@126.com wrote:
> >From: Xuebing Chen <chenxb_99091@126.com>
> >
>>The <include/drm/drm_crtc.h> provides drm_for_each_plane_mask macro and
>>plane_mask is defined as bitmask of plane indices, such as
>>1<<drm_plane_index(plane). This patch fixes error setting of plane_mask
> >in pan_display_atomic() function.
> >
> >Signed-off->>by: Xuebing Chen <chenxb_99091@126.com>
>What kernel is this patch against? Latest upstream doesn't have any such
>code anymore ... I'm assuming that Ville fixed this in one of his patches,
>but I can't find the right one just now.
>-Danie
This bug is still present in the long-supported versions of kernel 4.4.y, including the latest kernel 4.4.224,see https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/?h=v4.4.224
> >---
> > drivers/gpu/drm/drm_fb_helper.c | 2 +-
> >1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> >index e449f22..6a9f7ee 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
> >+++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -1256,7 +1256,7 @@ retry:
> > goto fail;
>>
> > plane = mode_set->crtc->primary;
>> - plane_mask |= drm_plane_index(plane);
> >+ plane_mask |= 1 << drm_plane_index(plane);
>> plane->old_fb = plane->fb;
> > }
> >
>> --
> >2.7.4
> >
>> _______________________________________________
>> dri-devel mailing list
> >dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
>Daniel Vetter
>Software Engineer, Intel Corporation
>http://blog.ffwll.ch
[-- Attachment #1.2: Type: text/html, Size: 3452 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-26 7:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 3:49 [PATCH] drm: fix setting of plane_mask in pan_display_atomic() function for linux-4.4 chenxb_99091
2020-05-25 14:34 ` Daniel Vetter
2020-05-25 14:56 ` Ville Syrjälä
2020-05-26 2:56 ` chenxb_99091
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).