When iterating over hsfreqrange_table, rcar_mipi_dsi_parameters_calc()
may dereference the sentinel table entry. Fix the loop condition to
break as soon as a suitable entry is found, defined by the lower bound
of the frequency range stored in the table being equal to or higher than
the target frequency.
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas(a)ideasonboard.…
[View More]com>
---
I will squash this with "drm: rcar-du: Add R-Car DSI driver", but I'm
posting it separately to ease review.
---
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
index faf993eae564..891bb956fd61 100644
--- a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
+++ b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
@@ -219,9 +219,8 @@ static void rcar_mipi_dsi_parameters_calc(struct rcar_mipi_dsi *dsi,
/* Find hsfreqrange */
hsfreq = fout_target * 2;
for (i = 0; i < ARRAY_SIZE(hsfreqrange_table); i++) {
- if (hsfreq > hsfreqrange_table[i][0] &&
- hsfreq <= hsfreqrange_table[i+1][0]) {
- setup_info->hsfreqrange = hsfreqrange_table[i+1][1];
+ if (hsfreqrange_table[i][0] >= hsfreq) {
+ setup_info->hsfreqrange = hsfreqrange_table[i][1];
break;
}
}
base-commit: c18c8891111bb5e014e144716044991112f16833
prerequisite-patch-id: dc9121a1b85ea05bf3eae2b0ac2168d47101ee87
prerequisite-patch-id: 6754b2ec4caec03e235550004003fe63c1cc793b
prerequisite-patch-id: d69c605df34d40934fa5d4e00f23d5785105099d
prerequisite-patch-id: 7d9edfb4758cafe8aec92d32709c0ad25a50942c
prerequisite-patch-id: 86c526fb41f9f9cbe95c50ba8a140e20484f187f
prerequisite-patch-id: a9649b53b55858f023b8d3d29afb9be7ad39ea3b
--
Regards,
Laurent Pinchart
[View Less]
Host1x seems to be relying on picking up dma-mapping.h transitively from
iova.h, which has no reason to include it in the first place. Fix the
former issue before we totally break things by fixing the latter one.
CC: Thierry Reding <thierry.reding(a)gmail.com>
CC: Mikko Perttunen <mperttunen(a)nvidia.com>
CC: dri-devel(a)lists.freedesktop.org
CC: linux-tegra(a)vger.kernel.org
Signed-off-by: Robin Murphy <robin.murphy(a)arm.com>
---
Feel free to pick this into drm-misc-next …
[View More]or drm-misc-fixes straight
away if that suits - it's only to avoid a build breakage once the rest
of the series gets queued.
Robin.
drivers/gpu/host1x/bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
index 218e3718fd68..881fad5c3307 100644
--- a/drivers/gpu/host1x/bus.c
+++ b/drivers/gpu/host1x/bus.c
@@ -5,6 +5,7 @@
*/
#include <linux/debugfs.h>
+#include <linux/dma-mapping.h>
#include <linux/host1x.h>
#include <linux/of.h>
#include <linux/seq_file.h>
--
2.28.0.dirty
[View Less]
Hi,
Here are a few patches adding support for the P030 and the BT709 and BT2020
colorspaces.
Let me know what you think,
Maxime
Changes from v1:
- Reworded the format description
- Fixed use before initialisation
Dave Stevenson (3):
drm/fourcc: Add packed 10bit YUV 4:2:0 format
drm/vc4: plane: Add support for DRM_FORMAT_P030
drm/vc4: plane: Add support for YUV color encodings and ranges
drivers/gpu/drm/drm_fourcc.c | 3 +
drivers/gpu/drm/vc4/vc4_plane.c | 199 +++++++++++++++++…
[View More]+++++++++------
drivers/gpu/drm/vc4/vc4_regs.h | 19 ++-
include/uapi/drm/drm_fourcc.h | 11 ++
4 files changed, 193 insertions(+), 39 deletions(-)
--
2.33.1
[View Less]
From: Arnd Bergmann <arnd(a)arndb.de>
The fsl-dcu driver uses the gem_cma_helper code, but does
noto enforce enabling this through Kconfig:
arm-linux-gnueabi-ld: drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.o:(.rodata+0x32c): undefined reference to `drm_gem_cma_prime_import_sg_table'
arm-linux-gnueabi-ld: drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.o:(.rodata+0x334): undefined reference to `drm_gem_cma_dumb_create'
arm-linux-gnueabi-ld: drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.o: in function `…
[View More]fsl_dcu_drm_plane_atomic_update':
fsl_dcu_drm_plane.c:(.text+0x144): undefined reference to `drm_fb_cma_get_gem_obj'
Add the same 'select' that is used in other such drivers.
Fixes: 09717af7d13d ("drm: Remove CONFIG_DRM_KMS_CMA_HELPER option")
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
---
drivers/gpu/drm/fsl-dcu/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/fsl-dcu/Kconfig b/drivers/gpu/drm/fsl-dcu/Kconfig
index 2a13ea5c8539..e95e96c565ba 100644
--- a/drivers/gpu/drm/fsl-dcu/Kconfig
+++ b/drivers/gpu/drm/fsl-dcu/Kconfig
@@ -3,6 +3,7 @@ config DRM_FSL_DCU
tristate "DRM Support for Freescale DCU"
depends on DRM && OF && ARM && COMMON_CLK
select BACKLIGHT_CLASS_DEVICE
+ select DRM_GEM_CMA_HELPER
select DRM_KMS_HELPER
select DRM_PANEL
select REGMAP_MMIO
--
2.29.2
[View Less]
The return value of dma_set_coherent_mask() is not always 0.
To catch the exception in case that dma is not support the mask.
Fixes: a1d2a6339961 ("drm/lima: driver for ARM Mali4xx GPUs")
Signed-off-by: Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
---
drivers/gpu/drm/lima/lima_device.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/lima/lima_device.c b/drivers/gpu/drm/lima/lima_device.c
index 65fdca366e41..75e9a2060b47 100644
--- a/drivers/gpu/drm/lima/…
[View More]lima_device.c
+++ b/drivers/gpu/drm/lima/lima_device.c
@@ -356,7 +356,9 @@ int lima_device_init(struct lima_device *ldev)
struct platform_device *pdev = to_platform_device(ldev->dev);
int err, i;
- dma_set_coherent_mask(ldev->dev, DMA_BIT_MASK(32));
+ err = dma_set_coherent_mask(ldev->dev, DMA_BIT_MASK(32));
+ if (err)
+ return err;
err = lima_clk_init(ldev);
if (err)
--
2.25.1
[View Less]