提交 e0690c4a 编写于 作者: F Fang Yafen 提交者: Zheng Zengkai

video&logo: keep the original function for non-RPi

raspberrypi inclusion
category: feature
bugzilla: 50432

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

This patch adjusts following video & logo patches for
raspberry pi on non-Raspberry Pi platforms, using specific
config CONFIG_OPENEULER_RASPBERRYPI to distinguish them:

38a1e371 bcm2708 framebuffer driver
08fb78e5 drm: Checking of the pitch is only valid for linear formats
31c95f1a media: videobuf2: Allow exporting of a struct dmabuf
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 459ac03f
......@@ -217,6 +217,7 @@ static int framebuffer_check(struct drm_device *dev,
if (min_pitch > UINT_MAX)
return -ERANGE;
#ifdef CONFIG_OPENEULER_RASPBERRYPI
if (r->modifier[i] == DRM_FORMAT_MOD_LINEAR) {
if ((uint64_t)height * r->pitches[i] + r->offsets[i] >
UINT_MAX)
......@@ -228,6 +229,15 @@ static int framebuffer_check(struct drm_device *dev,
return -EINVAL;
}
}
#else
if ((uint64_t) height * r->pitches[i] + r->offsets[i] > UINT_MAX)
return -ERANGE;
if (block_size && r->pitches[i] < min_pitch) {
DRM_DEBUG_KMS("bad pitch %u for plane %d\n", r->pitches[i], i);
return -EINVAL;
}
#endif
if (r->modifier[i] && !(r->flags & DRM_MODE_FB_MODIFIERS)) {
DRM_DEBUG_KMS("bad fb modifier %llu for plane %d\n",
......
......@@ -4,7 +4,11 @@
obj-$(CONFIG_LOGO) += logo.o
obj-$(CONFIG_LOGO_LINUX_MONO) += logo_linux_mono.o
obj-$(CONFIG_LOGO_LINUX_VGA16) += logo_linux_vga16.o
ifdef CONFIG_OPENEULER_RASPBERRYPI
obj-$(CONFIG_LOGO_LINUX_CLUT224) += logo_linux_rpi_clut224.o
else
obj-$(CONFIG_LOGO_LINUX_CLUT224) += logo_linux_clut224.o
endif
obj-$(CONFIG_LOGO_DEC_CLUT224) += logo_dec_clut224.o
obj-$(CONFIG_LOGO_MAC_CLUT224) += logo_mac_clut224.o
obj-$(CONFIG_LOGO_PARISC_CLUT224) += logo_parisc_clut224.o
......
......@@ -73,8 +73,12 @@ const struct linux_logo * __ref fb_find_logo(int depth)
if (depth >= 8) {
#ifdef CONFIG_LOGO_LINUX_CLUT224
/* Generic Linux logo */
#ifdef CONFIG_OPENEULER_RASPBERRYPI
logo = &logo_linux_rpi_clut224;
#else
logo = &logo_linux_clut224;
#endif
#endif
#ifdef CONFIG_LOGO_DEC_CLUT224
/* DEC Linux logo on MIPS/MIPS64 or ALPHA */
logo = &logo_dec_clut224;
......
此差异已折叠。
......@@ -36,6 +36,7 @@ struct linux_logo {
extern const struct linux_logo logo_linux_mono;
extern const struct linux_logo logo_linux_vga16;
extern const struct linux_logo logo_linux_clut224;
extern const struct linux_logo logo_linux_rpi_clut224;
extern const struct linux_logo logo_dec_clut224;
extern const struct linux_logo logo_mac_clut224;
extern const struct linux_logo logo_parisc_clut224;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册