This doesn't do anything except auto-init drm_agp support when you
call drm_get_pci_dev(). Which amdgpu stopped doing with
commit b58c11314a1706bf094c489ef5cb28f76478c704
Author: Alex Deucher <alexander.deucher(a)amd.com>
Date: Fri Jun 2 17:16:31 2017 -0400
drm/amdgpu: drop deprecated drm_get_pci_dev and drm_put_dev
No idea whether this was intentional or accidental breakage, but I
guess anyone who manages to boot a this modern gpu behind an agp
bridge deserves a price. A price I …
[View More]never expect anyone to ever collect
:-)
Cc: Alex Deucher <alexander.deucher(a)amd.com>
Cc: "Christian König" <christian.koenig(a)amd.com>
Cc: Hawking Zhang <Hawking.Zhang(a)amd.com>
Cc: Xiaojie Yuan <xiaojie.yuan(a)amd.com>
Cc: Evan Quan <evan.quan(a)amd.com>
Cc: "Tianci.Yin" <tianci.yin(a)amd.com>
Cc: "Marek Olšák" <marek.olsak(a)amd.com>
Cc: Hans de Goede <hdegoede(a)redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter(a)intel.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 4598836c5fa4..6cea92017109 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1379,7 +1379,7 @@ int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv)
static struct drm_driver kms_driver = {
.driver_features =
- DRIVER_USE_AGP | DRIVER_ATOMIC |
+ DRIVER_ATOMIC |
DRIVER_GEM |
DRIVER_RENDER | DRIVER_MODESET | DRIVER_SYNCOBJ |
DRIVER_SYNCOBJ_TIMELINE,
--
2.24.1
[View Less]
From: Sean Paul <seanpaul(a)chromium.org>
Hey all,
Earlier this week on my 5.5 kernel (I can't seem to get a 5.6 kernel to
behave on any of my devices), I ran into the multi-reply problem that
Wayne fixed in January. Without realizing there was already a fix
upstream, I went about solving it in different way. It wasn't until
rebasing the patches on 5.6 for the list that I realized there was
already a solution.
At any rate, I think this way of handling things might be a bit more
…
[View More]performant. I'm not super happy with the cleanliness of the code, I
think this series should make things easier to read, but I don't think I
achieved that. So suggestions are welcome on how to break this apart.
Thanks,
Sean
Sean Paul (3):
drm/mst: Separate sideband packet header parsing from message building
drm/mst: Support simultaneous down replies
drm/dp_mst: Remove single tx msg restriction.
drivers/gpu/drm/drm_dp_mst_topology.c | 196 ++++++++++++++------------
include/drm/drm_dp_mst_helper.h | 65 ++++-----
2 files changed, 137 insertions(+), 124 deletions(-)
--
Sean Paul, Software Engineer, Google / Chromium OS
[View Less]
When syzkaller tests, there is a UAF:
BUG: KASan: use after free in vgacon_invert_region+0x9d/0x110 at addr
ffff880000100000
Read of size 2 by task syz-executor.1/16489
page:ffffea0000004000 count:0 mapcount:-127 mapping: (null)
index:0x0
page flags: 0xfffff00000000()
page dumped because: kasan: bad access detected
CPU: 1 PID: 16489 Comm: syz-executor.1 Not tainted
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.9.3-0-ge2fc41e-prebuilt.qemu-…
[View More]project.org 04/01/2014
Call Trace:
[<ffffffffb119f309>] dump_stack+0x1e/0x20
[<ffffffffb04af957>] kasan_report+0x577/0x950
[<ffffffffb04ae652>] __asan_load2+0x62/0x80
[<ffffffffb090f26d>] vgacon_invert_region+0x9d/0x110
[<ffffffffb0a39d95>] invert_screen+0xe5/0x470
[<ffffffffb0a21dcb>] set_selection+0x44b/0x12f0
[<ffffffffb0a3bfae>] tioclinux+0xee/0x490
[<ffffffffb0a1d114>] vt_ioctl+0xff4/0x2670
[<ffffffffb0a0089a>] tty_ioctl+0x46a/0x1a10
[<ffffffffb052db3d>] do_vfs_ioctl+0x5bd/0xc40
[<ffffffffb052e2f2>] SyS_ioctl+0x132/0x170
[<ffffffffb11c9b1b>] system_call_fastpath+0x22/0x27
Memory state around the buggy address:
ffff8800000fff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
ffff8800000fff80: 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
>ffff880000100000: ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff
It can be reproduce in the linux mainline by the program:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/vt.h>
struct tiocl_selection {
unsigned short xs; /* X start */
unsigned short ys; /* Y start */
unsigned short xe; /* X end */
unsigned short ye; /* Y end */
unsigned short sel_mode; /* selection mode */
};
#define TIOCL_SETSEL 2
struct tiocl {
unsigned char type;
unsigned char pad;
struct tiocl_selection sel;
};
int main()
{
int fd = 0;
const char *dev = "/dev/char/4:1";
struct vt_consize v = {0};
struct tiocl tioc = {0};
fd = open(dev, O_RDWR, 0);
v.v_rows = 3346;
ioctl(fd, VT_RESIZEX, &v);
tioc.type = TIOCL_SETSEL;
ioctl(fd, TIOCLINUX, &tioc);
return 0;
}
When resize the screen, update the 'vc->vc_size_row' to the new_row_size,
but when 'set_origin' in 'vgacon_set_origin', vgacon use 'vga_vram_base'
for 'vc_origin' and 'vc_visible_origin', not 'vc_screenbuf'. It maybe
smaller than 'vc_screenbuf'. When TIOCLINUX, use the new_row_size to calc
the offset, it maybe larger than the vga_vram_size in vgacon driver, then
bad access.
Also, if set an larger screenbuf firstly, then set an more larger
screenbuf, when copy old_origin to new_origin, a bad access may happen.
So, If the screen size larger than vga_vram, resize screen should be
failed. This alse fix CVE-2020-8649 and CVE-2020-8647.
Fixes: 0aec4867dca14 ("[PATCH] SVGATextMode fix")
Reference: CVE-2020-8647 and CVE-2020-8649
Reported-by: Hulk Robot <hulkci(a)huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5(a)huawei.com>
---
drivers/video/console/vgacon.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index de7b8382aba9..998b0de1812f 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -1316,6 +1316,9 @@ static int vgacon_font_get(struct vc_data *c, struct console_font *font)
static int vgacon_resize(struct vc_data *c, unsigned int width,
unsigned int height, unsigned int user)
{
+ if ((width << 1) * height > vga_vram_size)
+ return -EINVAL;
+
if (width % 2 || width > screen_info.orig_video_cols ||
height > (screen_info.orig_video_lines * vga_default_font_height)/
c->vc_font.height)
--
2.17.2
[View Less]
Hi Linus,
Weekly fixes round, looks like a few people woke up, got a bunch of
fixes across the drivers. Bit bigger than I'd like but they all seem
fine and hopefully it quiets down now.
sun4i, kirin, mediatek and exynos on the ARM side.
virtio-gpu and core have some mmap fixes, and there is a dma-buf leak.
one ttm fence leak is also fixed.
Otherwise it's mostly amdgpu and i915. One of the i915 fixes is for a
very long latency I was seeing (using latencytop) running gnome-shell
locally when …
[View More]using firefox and eating nearly all my RAM, it really
helps with desktop responsiveness esp when firefox is chewing a lot.
Dave.
drm-fixes-2020-03-06:
drm fixes for 5.6-rc5
dma-buf:
- fix memory leak
core:
- shmem object mmap fix.
ttm:
- Fix fence leak in ttm_buffer_object_transfer().
amdgpu:
- Gfx reset fix for gfx9, 10
- Fix for gfx10
- DP MST fix
- DCC fix
- Renoir power fixes
- Navi power fix
i915:
- Break up long lists of object reclaim with cond_resched()
- PSR probe fix
- TGL workarounds
- Selftest return value fix
- Drop timeline mutex while waiting for retirement
- Wait for OA configuration completion before writes to OA buffer
virtio:
- Fix resource id creation race in virtio.
- mmap fixes
sun4i:
- Fixes for sun4i VI layer format support.
kirin:
- kirin: Revert "Fix for hikey620 display offset problem"
exynos:
- fix a kernel oops problem in case that driver is loaded as module.
- fix a regulator warning issue when I2C DDC adapter cannot be gathered.
- print out an error message only in error case excepting -EPROBE_DEFER.
mediatek:
- overlay, cursor and gce fixes.
`
The following changes since commit 98d54f81e36ba3bf92172791eba5ca5bd813989b:
Linux 5.6-rc4 (2020-03-01 16:38:46 -0600)
are available in the Git repository at:
git://anongit.freedesktop.org/drm/drm tags/drm-fixes-2020-03-06
for you to fetch changes up to 2ac4853e295bba53209917e14af701c45c99ce04:
Merge tag 'amd-drm-fixes-5.6-2020-03-05' of
git://people.freedesktop.org/~agd5f/linux into drm-fixes (2020-03-06
11:06:33 +1000)
----------------------------------------------------------------
drm fixes for 5.6-rc5
dma-buf:
- fix memory leak
core:
- shmem object mmap fix.
ttm:
- Fix fence leak in ttm_buffer_object_transfer().
amdgpu:
- Gfx reset fix for gfx9, 10
- Fix for gfx10
- DP MST fix
- DCC fix
- Renoir power fixes
- Navi power fix
i915:
- Break up long lists of object reclaim with cond_resched()
- PSR probe fix
- TGL workarounds
- Selftest return value fix
- Drop timeline mutex while waiting for retirement
- Wait for OA configuration completion before writes to OA buffer
virtio:
- Fix resource id creation race in virtio.
- mmap fixes
sun4i:
- Fixes for sun4i VI layer format support.
kirin:
- kirin: Revert "Fix for hikey620 display offset problem"
exynos:
- fix a kernel oops problem in case that driver is loaded as module.
- fix a regulator warning issue when I2C DDC adapter cannot be gathered.
- print out an error message only in error case excepting -EPROBE_DEFER.
mediatek:
- overlay, cursor and gce fixes.
`
----------------------------------------------------------------
Ahzo (1):
drm/ttm: fix leaking fences via ttm_buffer_object_transfer
Bhawanpreet Lakha (1):
drm/amd/display: Clear link settings on MST disable connector
Bibby Hsieh (4):
drm/mediatek: Add plane check in async_check function
drm/mediatek: Add fb swap in async_update
drm/mediatek: Move gce event property to mutex device node
drm/mediatek: Make sure previous message done or be aborted before send
Chris Wilson (4):
drm/i915/gem: Break up long lists of object reclaim
drm/i915: Protect i915_request_await_start from early waits
drm/i915/perf: Reintroduce wait on OA configuration completion
drm/i915/gt: Drop the timeline->mutex as we wait for retirement
Cong Wang (1):
dma-buf: free dmabuf->name in dma_buf_release()
Dan Carpenter (1):
drm/i915/selftests: Fix return in assert_mmap_offset()
Dave Airlie (5):
Merge tag 'exynos-drm-fixes-for-v5.6-rc5' of
git://git.kernel.org/.../daeinki/drm-exynos into drm-fixes
Merge tag 'mediatek-drm-fixes-5.6' of
https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes
Merge tag 'drm-misc-fixes-2020-03-05' of
git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
Merge tag 'drm-intel-fixes-2020-03-05' of
git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
Merge tag 'amd-drm-fixes-5.6-2020-03-05' of
git://people.freedesktop.org/~agd5f/linux into drm-fixes
Evan Benn (1):
drm/mediatek: Find the cursor plane instead of hard coding it
Gerd Hoffmann (3):
drm/shmem: add support for per object caching flags.
drm/virtio: fix mmap page attributes
drm/shmem: drop pgprot_decrypted()
Hersen Wu (1):
drm/amdgpu/display: navi1x copy dcn watermark clock settings to
smu resume from s3 (v2)
Icenowy Zheng (1):
drm/bridge: analogix-anx6345: fix set of link bandwidth
Jernej Skrabec (3):
drm/sun4i: de2/de3: Remove unsupported VI layer formats
drm/sun4i: Add separate DE3 VI layer formats
drm/sun4i: Fix DE2 VI layer format support
John Bates (1):
drm/virtio: fix resource id creation race
John Stultz (1):
drm: kirin: Revert "Fix for hikey620 display offset problem"
Josip Pavic (1):
drm/amd/display: fix dcc swath size calculations on dcn1
José Roberto de Souza (1):
drm/i915/psr: Force PSR probe only after full initialization
Lucas De Marchi (1):
drm/i915/tgl: Add Wa_1608008084
Marek Szyprowski (3):
drm/exynos: dsi: propagate error value and silence meaningless warning
drm/exynos: dsi: fix workaround for the legacy clock name
drm/exynos: hdmi: don't leak enable HDMI_EN regulator if probe fails
Matt Roper (2):
drm/i915: Program MBUS with rmw during initialization
drm/i915/tgl: Add Wa_22010178259:tgl
Phong LE (1):
drm/mediatek: Handle component type MTK_DISP_OVL_2L correctly
Prike Liang (2):
drm/amd/powerplay: fix pre-check condition for setting clock range
drm/amd/powerplay: map mclk to fclk for COMBINATIONAL_BYPASS case
Sean Paul (1):
drm/mediatek: Ensure the cursor plane is on top of other overlays
Tianci.Yin (1):
drm/amdgpu: disable 3D pipe 1 on Navi1x
Tomeu Vizoso (1):
drm/panfrost: Don't try to map on error faults
Yintian Tao (1):
drm/amdgpu: clean wptr on wb when gpu recovery
drivers/dma-buf/dma-buf.c | 1 +
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 98 ++++++++++---------
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 +
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 69 ++++++++++++++
.../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 1 +
.../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c | 4 +-
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +-
drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 6 +-
drivers/gpu/drm/amd/powerplay/smu_v12_0.c | 3 -
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 3 +-
drivers/gpu/drm/drm_gem_shmem_helper.c | 16 +++-
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 12 ++-
drivers/gpu/drm/exynos/exynos_hdmi.c | 22 +++--
drivers/gpu/drm/hisilicon/kirin/kirin_ade_reg.h | 1 -
drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 20 ----
drivers/gpu/drm/i915/display/intel_display_power.c | 29 +++++-
drivers/gpu/drm/i915/display/intel_psr.c | 25 ++++-
drivers/gpu/drm/i915/display/intel_psr.h | 1 +
drivers/gpu/drm/i915/gem/i915_gem_object.c | 1 +
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 2 +-
drivers/gpu/drm/i915/gt/intel_gt_requests.c | 14 ++-
drivers/gpu/drm/i915/gt/intel_workarounds.c | 19 ++--
drivers/gpu/drm/i915/i915_drv.c | 3 +
drivers/gpu/drm/i915/i915_drv.h | 2 +-
drivers/gpu/drm/i915/i915_perf.c | 58 ++++++++----
drivers/gpu/drm/i915/i915_perf_types.h | 3 +-
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/i915_request.c | 41 +++++---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 30 ++++--
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 1 +
drivers/gpu/drm/mediatek/mtk_drm_plane.c | 7 ++
drivers/gpu/drm/panfrost/panfrost_mmu.c | 44 ++++-----
drivers/gpu/drm/sun4i/sun8i_mixer.c | 104 ++++++++++++++++++---
drivers/gpu/drm/sun4i/sun8i_mixer.h | 11 +++
drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 66 +++++++++++--
drivers/gpu/drm/ttm/ttm_bo_util.c | 1 +
drivers/gpu/drm/virtio/virtgpu_object.c | 5 +-
include/drm/drm_gem_shmem_helper.h | 5 +
38 files changed, 520 insertions(+), 212 deletions(-)
[View Less]
Hi!
Follow-up on the v4: https://patchwork.kernel.org/cover/11369777/, some
of the core patches got merged already (thanks Rob!).
The main purpose of this series is to upstream the dts change and the
binding document, but I wanted to see how far I could probe the GPU, to
check that the binding is indeed correct. The rest of the patches are
RFC/work-in-progress.
So this is tested on MT8183 with a chromeos-4.19 kernel, and a ton of
backports to get the latest panfrost driver (I should probably …
[View More]try on
linux-next at some point but this was the path of least resistance).
I tested it as a module as it's more challenging (originally probing would
work built-in, on boot, but not as a module, as I didn't have the power
domain changes, and all power domains are on by default during boot).
Probing logs looks like this, currently. They look sane.
[ 501.319728] panfrost 13040000.gpu: clock rate = 511999970
[ 501.320041] panfrost 13040000.gpu: Linked as a consumer to regulator.14
[ 501.320102] panfrost 13040000.gpu: Linked as a consumer to regulator.31
[ 501.320651] panfrost 13040000.gpu: Linked as a consumer to genpd:0:13040000.gpu
[ 501.320954] panfrost 13040000.gpu: Linked as a consumer to genpd:1:13040000.gpu
[ 501.321062] panfrost 13040000.gpu: Linked as a consumer to genpd:2:13040000.gpu
[ 501.321734] panfrost 13040000.gpu: mali-g72 id 0x6221 major 0x0 minor 0x3 status 0x0
[ 501.321741] panfrost 13040000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[ 501.321747] panfrost 13040000.gpu: Features: L2:0x07120206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[ 501.321752] panfrost 13040000.gpu: shader_present=0x7 l2_present=0x1
[ 501.324951] [drm] Initialized panfrost 1.1.0 20180908 for 13040000.gpu on minor 2
Some more changes are still required to get devfreq working, and of course
I do not have a userspace driver to test this with.
I believe at least patches 1 & 2 can be merged (2 depends on another
patch series, so maybe we could start with 1 only for now...).
Thanks!
Nicolas Boichat (4):
dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183
arm64: dts: mt8183: Add node for the Mali GPU
RFC: drm/panfrost: Add mt8183-mali compatible string
RFC: drm/panfrost: devfreq: Add support for 2 regulators
.../bindings/gpu/arm,mali-bifrost.yaml | 25 +++++
arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 7 ++
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 105 ++++++++++++++++++
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 17 +++
drivers/gpu/drm/panfrost/panfrost_device.h | 1 +
drivers/gpu/drm/panfrost/panfrost_drv.c | 11 ++
6 files changed, 166 insertions(+)
--
2.25.1.481.gfbce0eb801-goog
[View Less]
Updating bindings of dsi and dpu by adding and removing certain
properties.
Signed-off-by: Harigovindan P <harigovi(a)codeaurora.org>
---
Changes in v1:
- Adding "ahb" clock as a required property.
- Adding "bus", "rot", "lut" as optional properties for sc7180 device.
- Removing properties from dsi bindings that are unused.
- Removing power-domain property since DSI is the child node of MDSS
and it will inherit supply from its parent.
Documentation/…
[View More]devicetree/bindings/display/msm/dpu.txt | 7 +++++++
Documentation/devicetree/bindings/display/msm/dsi.txt | 5 -----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/msm/dpu.txt b/Documentation/devicetree/bindings/display/msm/dpu.txt
index 551ae26..dd58472a 100644
--- a/Documentation/devicetree/bindings/display/msm/dpu.txt
+++ b/Documentation/devicetree/bindings/display/msm/dpu.txt
@@ -19,6 +19,7 @@ Required properties:
The following clocks are required:
* "iface"
* "bus"
+ * "ahb"
* "core"
- interrupts: interrupt signal from MDSS.
- interrupt-controller: identifies the node as an interrupt controller.
@@ -50,6 +51,8 @@ Required properties:
- clock-names: device clock names, must be in same order as clocks property.
The following clocks are required.
* "bus"
+ For the device "qcom,sc7180-dpu":
+ * "bus" - is an optional property due to architecture change.
* "iface"
* "core"
* "vsync"
@@ -70,6 +73,10 @@ Optional properties:
- assigned-clocks: list of clock specifiers for clocks needing rate assignment
- assigned-clock-rates: list of clock frequencies sorted in the same order as
the assigned-clocks property.
+- For the device "qcom,sc7180-dpu":
+ clock-names: optional device clocks, needed for accessing LUT blocks.
+ * "rot"
+ * "lut"
Example:
diff --git a/Documentation/devicetree/bindings/display/msm/dsi.txt b/Documentation/devicetree/bindings/display/msm/dsi.txt
index af95586..61d659a 100644
--- a/Documentation/devicetree/bindings/display/msm/dsi.txt
+++ b/Documentation/devicetree/bindings/display/msm/dsi.txt
@@ -8,13 +8,10 @@ Required properties:
- reg-names: The names of register regions. The following regions are required:
* "dsi_ctrl"
- interrupts: The interrupt signal from the DSI block.
-- power-domains: Should be <&mmcc MDSS_GDSC>.
- clocks: Phandles to device clocks.
- clock-names: the following clocks are required:
- * "mdp_core"
* "iface"
* "bus"
- * "core_mmss"
* "byte"
* "pixel"
* "core"
@@ -156,7 +153,6 @@ Example:
"core",
"core_mmss",
"iface",
- "mdp_core",
"pixel";
clocks =
<&mmcc MDSS_AXI_CLK>,
@@ -164,7 +160,6 @@ Example:
<&mmcc MDSS_ESC0_CLK>,
<&mmcc MMSS_MISC_AHB_CLK>,
<&mmcc MDSS_AHB_CLK>,
- <&mmcc MDSS_MDP_CLK>,
<&mmcc MDSS_PCLK0_CLK>;
assigned-clocks =
--
2.7.4
[View Less]