dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.4 214/367] backlight/gpio_backlight: Compare against struct fb_info.device
       [not found] <20230920112858.471730572@linuxfoundation.org>
@ 2023-09-20 11:29 ` Greg Kroah-Hartman
  2023-09-20 11:29 ` [PATCH 5.4 215/367] backlight/bd6107: " Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2023-09-20 11:29 UTC (permalink / raw)
  To: stable
  Cc: Daniel Thompson, Laurent Pinchart, Jingoo Han, linux-sh,
	Greg Kroah-Hartman, Lee Jones, patches, dri-devel, Rich Felker,
	Thomas Zimmermann, John Paul Adrian Glaubitz, Sam Ravnborg

5.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Zimmermann <tzimmermann@suse.de>

commit 7b91d017f77c1bda56f27c2f4bbb70de7c6eca08 upstream.

Struct gpio_backlight_platform_data refers to a platform device within
the Linux device hierarchy. The test in gpio_backlight_check_fb()
compares it against the fbdev device in struct fb_info.dev, which
is different. Fix the test by comparing to struct fb_info.device.

Fixes a bug in the backlight driver and prepares fbdev for making
struct fb_info.dev optional.

v2:
	* move renames into separate patch (Javier, Sam, Michael)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 8b770e3c9824 ("backlight: Add GPIO-based backlight driver")
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Lee Jones <lee@kernel.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: linux-sh@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v3.12+
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-4-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/video/backlight/gpio_backlight.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/video/backlight/gpio_backlight.c
+++ b/drivers/video/backlight/gpio_backlight.c
@@ -46,7 +46,7 @@ static int gpio_backlight_check_fb(struc
 {
 	struct gpio_backlight *gbl = bl_get_data(bl);
 
-	return gbl->fbdev == NULL || gbl->fbdev == info->dev;
+	return gbl->fbdev == NULL || gbl->fbdev == info->device;
 }
 
 static const struct backlight_ops gpio_backlight_ops = {



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

* [PATCH 5.4 215/367] backlight/bd6107: Compare against struct fb_info.device
       [not found] <20230920112858.471730572@linuxfoundation.org>
  2023-09-20 11:29 ` [PATCH 5.4 214/367] backlight/gpio_backlight: Compare against struct fb_info.device Greg Kroah-Hartman
@ 2023-09-20 11:29 ` Greg Kroah-Hartman
  2023-09-20 11:29 ` [PATCH 5.4 216/367] backlight/lv5207lp: " Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2023-09-20 11:29 UTC (permalink / raw)
  To: stable
  Cc: Daniel Thompson, Laurent Pinchart, Greg Kroah-Hartman, Lee Jones,
	patches, dri-devel, Javier Martinez Canillas, Thomas Zimmermann,
	Jingoo Han, Sam Ravnborg

5.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Zimmermann <tzimmermann@suse.de>

commit 992bdddaabfba19bdc77c1c7a4977b2aa41ec891 upstream.

Struct bd6107_platform_data refers to a platform device within
the Linux device hierarchy. The test in bd6107_backlight_check_fb()
compares it against the fbdev device in struct fb_info.dev, which
is different. Fix the test by comparing to struct fb_info.device.

Fixes a bug in the backlight driver and prepares fbdev for making
struct fb_info.dev optional.

v2:
	* move renames into separate patch (Javier, Sam, Michael)

Fixes: 67b43e590415 ("backlight: Add ROHM BD6107 backlight driver")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Lee Jones <lee@kernel.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v3.12+
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-2-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/video/backlight/bd6107.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/video/backlight/bd6107.c
+++ b/drivers/video/backlight/bd6107.c
@@ -107,7 +107,7 @@ static int bd6107_backlight_check_fb(str
 {
 	struct bd6107 *bd = bl_get_data(backlight);
 
-	return bd->pdata->fbdev == NULL || bd->pdata->fbdev == info->dev;
+	return bd->pdata->fbdev == NULL || bd->pdata->fbdev == info->device;
 }
 
 static const struct backlight_ops bd6107_backlight_ops = {



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

* [PATCH 5.4 216/367] backlight/lv5207lp: Compare against struct fb_info.device
       [not found] <20230920112858.471730572@linuxfoundation.org>
  2023-09-20 11:29 ` [PATCH 5.4 214/367] backlight/gpio_backlight: Compare against struct fb_info.device Greg Kroah-Hartman
  2023-09-20 11:29 ` [PATCH 5.4 215/367] backlight/bd6107: " Greg Kroah-Hartman
@ 2023-09-20 11:29 ` Greg Kroah-Hartman
  2023-09-20 11:30 ` [PATCH 5.4 245/367] drm/ast: Fix DRAM init on AST2200 Greg Kroah-Hartman
  2023-09-21 12:08 ` [PATCH 5.4 000/367] 5.4.257-rc1 review Naresh Kamboju
  4 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2023-09-20 11:29 UTC (permalink / raw)
  To: stable
  Cc: Daniel Thompson, Laurent Pinchart, Yoshinori Sato, Jingoo Han,
	linux-sh, Greg Kroah-Hartman, Lee Jones, patches, dri-devel,
	Javier Martinez Canillas, Rich Felker, Thomas Zimmermann,
	John Paul Adrian Glaubitz, Sam Ravnborg

5.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Zimmermann <tzimmermann@suse.de>

commit 1ca8819320fd84e7d95b04e7668efc5f9fe9fa5c upstream.

Struct lv5207lp_platform_data refers to a platform device within
the Linux device hierarchy. The test in lv5207lp_backlight_check_fb()
compares it against the fbdev device in struct fb_info.dev, which
is different. Fix the test by comparing to struct fb_info.device.

Fixes a bug in the backlight driver and prepares fbdev for making
struct fb_info.dev optional.

v2:
	* move renames into separate patch (Javier, Sam, Michael)

Fixes: 82e5c40d88f9 ("backlight: Add Sanyo LV5207LP backlight driver")
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Lee Jones <lee@kernel.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: linux-sh@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v3.12+
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-6-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/video/backlight/lv5207lp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/video/backlight/lv5207lp.c
+++ b/drivers/video/backlight/lv5207lp.c
@@ -72,7 +72,7 @@ static int lv5207lp_backlight_check_fb(s
 {
 	struct lv5207lp *lv = bl_get_data(backlight);
 
-	return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->dev;
+	return lv->pdata->fbdev == NULL || lv->pdata->fbdev == info->device;
 }
 
 static const struct backlight_ops lv5207lp_backlight_ops = {



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

* [PATCH 5.4 245/367] drm/ast: Fix DRAM init on AST2200
       [not found] <20230920112858.471730572@linuxfoundation.org>
                   ` (2 preceding siblings ...)
  2023-09-20 11:29 ` [PATCH 5.4 216/367] backlight/lv5207lp: " Greg Kroah-Hartman
@ 2023-09-20 11:30 ` Greg Kroah-Hartman
  2023-09-21 12:08 ` [PATCH 5.4 000/367] 5.4.257-rc1 review Naresh Kamboju
  4 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2023-09-20 11:30 UTC (permalink / raw)
  To: stable
  Cc: Jocelyn Falempe, Sui Jingfeng, Greg Kroah-Hartman, patches,
	dri-devel, Thomas Zimmermann, Dave Airlie

5.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Zimmermann <tzimmermann@suse.de>

commit 4cfe75f0f14f044dae66ad0e6eea812d038465d9 upstream.

Fix the test for the AST2200 in the DRAM initialization. The value
in ast->chip has to be compared against an enum constant instead of
a numerical value.

This bug got introduced when the driver was first imported into the
kernel.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 312fec1405dd ("drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2)")
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v3.5+
Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Tested-by: Jocelyn Falempe <jfalempe@redhat.com> # AST2600
Link: https://patchwork.freedesktop.org/patch/msgid/20230621130032.3568-2-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/ast/ast_post.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/ast/ast_post.c
+++ b/drivers/gpu/drm/ast/ast_post.c
@@ -294,7 +294,7 @@ static void ast_init_dram_reg(struct drm
 				;
 			} while (ast_read32(ast, 0x10100) != 0xa8);
 		} else {/* AST2100/1100 */
-			if (ast->chip == AST2100 || ast->chip == 2200)
+			if (ast->chip == AST2100 || ast->chip == AST2200)
 				dram_reg_info = ast2100_dram_table_data;
 			else
 				dram_reg_info = ast1100_dram_table_data;



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

* Re: [PATCH 5.4 000/367] 5.4.257-rc1 review
       [not found] <20230920112858.471730572@linuxfoundation.org>
                   ` (3 preceding siblings ...)
  2023-09-20 11:30 ` [PATCH 5.4 245/367] drm/ast: Fix DRAM init on AST2200 Greg Kroah-Hartman
@ 2023-09-21 12:08 ` Naresh Kamboju
  2023-09-21 13:10   ` Sui Jingfeng
  4 siblings, 1 reply; 8+ messages in thread
From: Naresh Kamboju @ 2023-09-21 12:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Chun-Kuang Hu, f.fainelli, Sui Jingfeng, rwarsow, pavel, conor,
	shuah, dri-devel, patches, stable, linux-kernel, lkft-triage, srw,
	patches, akpm, jonathanh, torvalds, sudipm.mukherjee, linux

On Wed, 20 Sept 2023 at 14:25, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 5.4.257 release.
> There are 367 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri, 22 Sep 2023 11:28:09 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
>         https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.257-rc1.gz
> or in the git tree and branch at:
>         git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

Following build warnings noticed while building arm64 with allmodconfig
on stable-rc 5.4 with gcc-8 and gcc-12 toolchains.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

drivers/gpu/drm/mediatek/mtk_drm_gem.c: In function 'mtk_drm_gem_prime_vmap':
drivers/gpu/drm/mediatek/mtk_drm_gem.c:273:10: warning: returning
'int' from a function with return type 'void *' makes pointer from
integer without a cast [-Wint-conversion]
   return -ENOMEM;
          ^

Links:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2VfG47LmPH9MUEuIcMVftu6NsFy/


Following commit is causing this build warning.

drm/mediatek: Fix potential memory leak if vmap() fail
[ Upstream commit 379091e0f6d179d1a084c65de90fa44583b14a70 ]

--
Linaro LKFT
https://lkft.linaro.org

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

* Re: [PATCH 5.4 000/367] 5.4.257-rc1 review
  2023-09-21 12:08 ` [PATCH 5.4 000/367] 5.4.257-rc1 review Naresh Kamboju
@ 2023-09-21 13:10   ` Sui Jingfeng
  2023-09-21 13:16     ` Sui Jingfeng
  0 siblings, 1 reply; 8+ messages in thread
From: Sui Jingfeng @ 2023-09-21 13:10 UTC (permalink / raw)
  To: Naresh Kamboju, Greg Kroah-Hartman
  Cc: Chun-Kuang Hu, f.fainelli, rwarsow, pavel, conor, shuah,
	dri-devel, patches, stable, linux-kernel, lkft-triage, srw,
	patches, akpm, jonathanh, torvalds, sudipm.mukherjee, linux

Hi,


On 2023/9/21 20:08, Naresh Kamboju wrote:
> On Wed, 20 Sept 2023 at 14:25, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>> This is the start of the stable review cycle for the 5.4.257 release.
>> There are 367 patches in this series, all will be posted as a response
>> to this one.  If anyone has any issues with these being applied, please
>> let me know.
>>
>> Responses should be made by Fri, 22 Sep 2023 11:28:09 +0000.
>> Anything received after that time might be too late.
>>
>> The whole patch series can be found in one patch at:
>>          https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.257-rc1.gz
>> or in the git tree and branch at:
>>          git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
>> and the diffstat can be found below.
>>
>> thanks,
>>
>> greg k-h
> Following build warnings noticed while building arm64 with allmodconfig
> on stable-rc 5.4 with gcc-8 and gcc-12 toolchains.
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> drivers/gpu/drm/mediatek/mtk_drm_gem.c: In function 'mtk_drm_gem_prime_vmap':
> drivers/gpu/drm/mediatek/mtk_drm_gem.c:273:10: warning: returning
> 'int' from a function with return type 'void *' makes pointer from
> integer without a cast [-Wint-conversion]
>     return -ENOMEM;
>            ^


Well, this is easy to solve.
For the Linux-5.4 kernel, we should use "return -ERR_PTR(-ENOMEM)" instead of "return -ENOMEM".
Since, newer version kernel prefer to return error code instead of error pointer.
See below commit for more information.

commit <7e542ff8b463>  ("drm/mediatek: Use struct dma_buf_map in GEM 
vmap ops")
commit <49a3f51dfeee> ("drm/gem: Use struct dma_buf_map in GEM vmap ops 
and convert GEM backends")


> Links:
>   - https://storage.tuxsuite.com/public/linaro/lkft/builds/2VfG47LmPH9MUEuIcMVftu6NsFy/
>
>
> Following commit is causing this build warning.
>
> drm/mediatek: Fix potential memory leak if vmap() fail
> [ Upstream commit 379091e0f6d179d1a084c65de90fa44583b14a70 ]
>
> --
> Linaro LKFT
> https://lkft.linaro.org


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

* Re: [PATCH 5.4 000/367] 5.4.257-rc1 review
  2023-09-21 13:10   ` Sui Jingfeng
@ 2023-09-21 13:16     ` Sui Jingfeng
  2023-09-23  8:30       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Sui Jingfeng @ 2023-09-21 13:16 UTC (permalink / raw)
  To: Naresh Kamboju, Greg Kroah-Hartman
  Cc: Chun-Kuang Hu, f.fainelli, rwarsow, pavel, conor, shuah,
	dri-devel, patches, stable, linux-kernel, lkft-triage, srw,
	patches, akpm, jonathanh, torvalds, sudipm.mukherjee, linux

Hi,


On 2023/9/21 21:10, Sui Jingfeng wrote:
> return -ERR_PTR(-ENOMEM)


return ERR_PTR(-ENOMEM);


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

* Re: [PATCH 5.4 000/367] 5.4.257-rc1 review
  2023-09-21 13:16     ` Sui Jingfeng
@ 2023-09-23  8:30       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2023-09-23  8:30 UTC (permalink / raw)
  To: Sui Jingfeng
  Cc: Chun-Kuang Hu, f.fainelli, dri-devel, rwarsow, pavel, conor,
	shuah, Naresh Kamboju, patches, stable, linux-kernel, lkft-triage,
	srw, patches, akpm, jonathanh, torvalds, sudipm.mukherjee, linux

On Thu, Sep 21, 2023 at 09:16:57PM +0800, Sui Jingfeng wrote:
> Hi,
> 
> 
> On 2023/9/21 21:10, Sui Jingfeng wrote:
> > return -ERR_PTR(-ENOMEM)
> 
> 
> return ERR_PTR(-ENOMEM);

Thanks, now fixed up.

greg k-h

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

end of thread, other threads:[~2023-09-23  8:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230920112858.471730572@linuxfoundation.org>
2023-09-20 11:29 ` [PATCH 5.4 214/367] backlight/gpio_backlight: Compare against struct fb_info.device Greg Kroah-Hartman
2023-09-20 11:29 ` [PATCH 5.4 215/367] backlight/bd6107: " Greg Kroah-Hartman
2023-09-20 11:29 ` [PATCH 5.4 216/367] backlight/lv5207lp: " Greg Kroah-Hartman
2023-09-20 11:30 ` [PATCH 5.4 245/367] drm/ast: Fix DRAM init on AST2200 Greg Kroah-Hartman
2023-09-21 12:08 ` [PATCH 5.4 000/367] 5.4.257-rc1 review Naresh Kamboju
2023-09-21 13:10   ` Sui Jingfeng
2023-09-21 13:16     ` Sui Jingfeng
2023-09-23  8:30       ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox