Correct the argument name of @placement and added @sg description for
ttm_bo_init() and ttm_bo_init_reserved().
Argument @flags was replaced to @placement by Jerome in commit
09855acb1c2e3779f25317ec9a8ffe1b1784a4a8
Argument @sg was added by Dave in commit
129b78bfca591e736e56a294f0e357d73d938f7e
Signed-off-by: Amos Kong <amos(a)sietium.com>
Cc: Jerome Glisse <jglisse(a)redhat.com>
Cc: Dave Airlie <airlied(a)redhat.com>
---
include/drm/ttm/ttm_bo_api.h | 6 ++++--
1 file …
[View More]changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index f681bbdbc698..eb27bbee9888 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -363,9 +363,10 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
* @bo: Pointer to a ttm_buffer_object to be initialized.
* @size: Requested size of buffer object.
* @type: Requested type of buffer object.
- * @flags: Initial placement flags.
+ * @placement: Initial placement for buffer object.
* @page_alignment: Data alignment in pages.
* @ctx: TTM operation context for memory allocation.
+ * @sg: Scatter-gather table.
* @resv: Pointer to a dma_resv, or NULL to let ttm allocate one.
* @destroy: Destroy function. Use NULL for kfree().
*
@@ -406,7 +407,7 @@ int ttm_bo_init_reserved(struct ttm_device *bdev,
* @bo: Pointer to a ttm_buffer_object to be initialized.
* @size: Requested size of buffer object.
* @type: Requested type of buffer object.
- * @flags: Initial placement flags.
+ * @placement: Initial placement for buffer object.
* @page_alignment: Data alignment in pages.
* @interruptible: If needing to sleep to wait for GPU resources,
* sleep interruptible.
@@ -414,6 +415,7 @@ int ttm_bo_init_reserved(struct ttm_device *bdev,
* holds a pointer to a persistent shmem object. Typically, this would
* point to the shmem object backing a GEM object if TTM is used to back a
* GEM user interface.
+ * @sg: Scatter-gather table.
* @resv: Pointer to a dma_resv, or NULL to let ttm allocate one.
* @destroy: Destroy function. Use NULL for kfree().
*
--
2.31.1
[View Less]
In commit e11f5bd8228f ("drm: Add support for DP 1.4 Compliance edid
corruption test") the function connector_bad_edid() started assuming
that the memory for the EDID passed to it was big enough to hold
`edid[0x7e] + 1` blocks of data (1 extra for the base block). It
completely ignored the fact that the function was passed `num_blocks`
which indicated how much memory had been allocated for the EDID.
Let's fix this by adding a bounds check.
This is important for handling the case where there's …
[View More]an error in the
first block of the EDID. In that case we will call
connector_bad_edid() without having re-allocated memory based on
`edid[0x7e]`.
Fixes: e11f5bd8228f ("drm: Add support for DP 1.4 Compliance edid corruption test")
Reported-by: Ville Syrjälä <ville.syrjala(a)linux.intel.com>
Signed-off-by: Douglas Anderson <dianders(a)chromium.org>
---
This problem report came up in the context of a patch I sent out [1]
and this is my attempt at a fix. The problem predates my patch,
though. I don't personally know anything about DP compliance testing
and what should be happening here, nor do I apparently have any
hardware that actually reports a bad EDID. Thus this is just compile
tested. I'm hoping that someone here can test this and make sure it
seems OK to them.
drivers/gpu/drm/drm_edid.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 9b19eee0e1b4..ccfa08631c57 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1843,8 +1843,9 @@ static void connector_bad_edid(struct drm_connector *connector,
u8 num_of_ext = edid[0x7e];
/* Calculate real checksum for the last edid extension block data */
- connector->real_edid_checksum =
- drm_edid_block_checksum(edid + num_of_ext * EDID_LENGTH);
+ if (num_of_ext <= num_blocks - 1)
+ connector->real_edid_checksum =
+ drm_edid_block_checksum(edid + num_of_ext * EDID_LENGTH);
if (connector->bad_edid_counter++ && !drm_debug_enabled(DRM_UT_KMS))
return;
--
2.33.0.800.g4c38ced690-goog
[View Less]
From: Rob Clark <robdclark(a)chromium.org>
Respin of https://www.spinics.net/lists/linux-arm-msm/msg92182.html with
the remaining 3 patches that are not yet merged.
At the end of this series, but drm/msm and ti-sn65dsi86 work in both
combinations, so the two bridge patches can be merged indepdendently of
the msm/dsi patch.
The last patch has some conficts with https://www.spinics.net/lists/linux-arm-msm/msg93731.html
but I already have a rebased variant of it depending on which order
…
[View More]patches land.
Rob Clark (3):
drm/msm/dsi: Support NO_CONNECTOR bridges
drm/bridge: ti-sn65dsi86: Implement bridge->mode_valid()
drm/bridge: ti-sn65dsi86: Add NO_CONNECTOR support
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 64 ++++++++++++++++++---------
drivers/gpu/drm/msm/Kconfig | 2 +
drivers/gpu/drm/msm/dsi/dsi_manager.c | 50 +++++++++++++++------
3 files changed, 81 insertions(+), 35 deletions(-)
--
2.31.1
[View Less]
+ dri-devel, sorry hit 'send' too quickly
On Tue, Oct 5, 2021 at 3:45 PM Rob Clark <robdclark(a)gmail.com> wrote:
>
> Hi Dave & Daniel,
>
> A few fixes for v5.15:
>
> * Fix a new crash on dev file close if the dev file was opened when
> GPU is not loaded (such as missing fw in initrd)
> * Switch to single drm_sched_entity per priority level per drm_file
> to unbreak multi-context userspace
> * Serialize GMU access to fix GMU OOB errors
> * Various …
[View More]error path fixes
> * A couple integer overflow fixes
> * Fix mdp5 cursor plane WARNs
>
> The following changes since commit 5816b3e6577eaa676ceb00a848f0fd65fe2adc29:
>
> Linux 5.15-rc3 (2021-09-26 14:08:19 -0700)
>
> are available in the Git repository at:
>
> https://gitlab.freedesktop.org/drm/msm.git drm-msm-fixes-2021-10-05
>
> for you to fetch changes up to c6921fbc88e120b2279c55686a071ca312d058e9:
>
> drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
> (2021-10-04 08:08:07 -0700)
>
> ----------------------------------------------------------------
> Arnd Bergmann (1):
> drm/msm/submit: fix overflow check on 64-bit architectures
>
> Colin Ian King (1):
> drm/msm: Fix null pointer dereference on pointer edp
>
> Dan Carpenter (4):
> drm/msm/a4xx: fix error handling in a4xx_gpu_init()
> drm/msm/a3xx: fix error handling in a3xx_gpu_init()
> drm/msm/dsi: Fix an error code in msm_dsi_modeset_init()
> drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
>
> Dmitry Baryshkov (2):
> drm/msm/mdp5: fix cursor-related warnings
> drm/msm/dsi/phy: fix clock names in 28nm_8960 phy
>
> Fabio Estevam (1):
> drm/msm: Do not run snapshot on non-DPU devices
>
> Kuogee Hsieh (1):
> drm/msm/dp: only signal audio when disconnected detected at dp_pm_resume
>
> Marek Vasut (1):
> drm/msm: Avoid potential overflow in timeout_to_jiffies()
>
> Marijn Suijten (1):
> drm/msm/dsi: dsi_phy_14nm: Take ready-bit into account in poll_for_ready
>
> Rob Clark (5):
> drm/msm: Fix crash on dev file close
> drm/msm/a6xx: Serialize GMU communication
> drm/msm/a6xx: Track current ctx by seqno
> drm/msm: A bit more docs + cleanup
> drm/msm: One sched entity per process per priority
>
> Robert Foss (1):
> drm/msm/dpu: Fix address of SM8150 PINGPONG5 IRQ register
>
> Stephan Gerhold (1):
> drm/msm: Fix devfreq NULL pointer dereference on a3xx
>
> drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 9 ++--
> drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 9 ++--
> drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 +++
> drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 3 ++
> drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 46 ++++++++++++----
> drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 11 +++-
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +-
> drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 16 ++++++
> drivers/gpu/drm/msm/dp/dp_display.c | 10 ++--
> drivers/gpu/drm/msm/dsi/dsi.c | 4 +-
> drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
> drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 30 +++++------
> drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c | 4 +-
> drivers/gpu/drm/msm/edp/edp_ctrl.c | 3 +-
> drivers/gpu/drm/msm/msm_drv.c | 15 ++++--
> drivers/gpu/drm/msm/msm_drv.h | 47 +---------------
> drivers/gpu/drm/msm/msm_gem_submit.c | 7 +--
> drivers/gpu/drm/msm/msm_gpu.h | 66 ++++++++++++++++++++++-
> drivers/gpu/drm/msm/msm_gpu_devfreq.c | 6 +++
> drivers/gpu/drm/msm/msm_submitqueue.c | 72 ++++++++++++++++++++-----
> 20 files changed, 256 insertions(+), 112 deletions(-)
[View Less]
The reference counting issue happens in one exception handling path of
nouveau_svmm_bind(). When cli->svm.svmm is null, the function forgets
to decrease the refcount of mm increased by get_task_mm(), causing a
refcount leak.
Fix this issue by using mmput() to decrease the refcount in the
exception handling path.
Also, the function forgets to do check against null when get mm
by get_task_mm().
Fix this issue by adding null check after get mm by get_task_mm().
Signed-off-by: Chenyuan Mi &…
[View More]lt;cymi20(a)fudan.edu.cn>
Signed-off-by: Xiyu Yang <xiyuyang19(a)fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf(a)gmail.com>
---
drivers/gpu/drm/nouveau/nouveau_svm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c
index b0c3422cb01f..9985bfde015a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_svm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
@@ -162,10 +162,14 @@ nouveau_svmm_bind(struct drm_device *dev, void *data,
*/
mm = get_task_mm(current);
+ if (!mm) {
+ return -EINVAL;
+ }
mmap_read_lock(mm);
if (!cli->svm.svmm) {
mmap_read_unlock(mm);
+ mmput(mm);
return -EINVAL;
}
--
2.17.1
[View Less]
It turns out that sc8180x (among others) doesn't have the same internal
layout of the 4 subblocks. This series therefor modifies the binding to
require all four regions to be described individually and then extends
the driver to read these four regions. The driver will fall back to read
the old single-reg format and apply the original offsets and sizes.
Bjorn Andersson (5):
dt-bindings: msm/dp: Change reg definition
drm/msm/dp: Use devres for ioremap()
drm/msm/dp: Refactor ioremap …
[View More]wrapper
drm/msm/dp: Store each subblock in the io region
drm/msm/dp: Allow sub-regions to be specified in DT
.../bindings/display/msm/dp-controller.yaml | 13 ++-
drivers/gpu/drm/msm/dp/dp_catalog.c | 64 ++++-------
drivers/gpu/drm/msm/dp/dp_parser.c | 102 ++++++++++--------
drivers/gpu/drm/msm/dp/dp_parser.h | 11 +-
4 files changed, 100 insertions(+), 90 deletions(-)
--
2.29.2
[View Less]
The current implementation supports a single DP instance and the DPU code will
only match it against INTF_DP instance 0. These patches extends this to allow
multiple DP instances and support for matching against DP instances beyond 0.
With that in place add SC8180x DP and eDP controllers.
Bjorn Andersson (5):
drm/msm/dp: Remove global g_dp_display variable
drm/msm/dp: Modify prototype of encoder based API
drm/msm/dp: Support up to 3 DP controllers
dt-bindings: msm/dp: Add SC8180x …
[View More]compatibles
drm/msm/dp: Add sc8180x DP controllers
.../bindings/display/msm/dp-controller.yaml | 2 +
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 23 +--
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 66 +++++----
.../gpu/drm/msm/disp/msm_disp_snapshot_util.c | 8 +-
drivers/gpu/drm/msm/dp/dp_display.c | 131 +++++++++---------
drivers/gpu/drm/msm/msm_drv.h | 4 +-
6 files changed, 132 insertions(+), 102 deletions(-)
--
2.29.2
[View Less]