When a user tries to allocate too many or too big vGPUs and runs out
of graphics memory, the resulting error message is not actionable and
looks like an internal error.
Change the error message to clearly point out what actions a user can
take to resolve this situation.
Cc: Thomas Prescher <thomas.prescher(a)cyberus-technology.de>
Cc: Zhenyu Wang <zhenyuw(a)linux.intel.com>
Signed-off-by: Julian Stecklina <julian.stecklina(a)cyberus-technology.de>
---
drivers/gpu/drm/i915/…
[View More]gvt/aperture_gm.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/aperture_gm.c b/drivers/gpu/drm/i915/gvt/aperture_gm.c
index 0d6d598713082..5c5c8e871dae2 100644
--- a/drivers/gpu/drm/i915/gvt/aperture_gm.c
+++ b/drivers/gpu/drm/i915/gvt/aperture_gm.c
@@ -69,9 +69,12 @@ static int alloc_gm(struct intel_vgpu *vgpu, bool high_gm)
start, end, flags);
mmio_hw_access_post(gt);
mutex_unlock(>->ggtt->vm.mutex);
- if (ret)
- gvt_err("fail to alloc %s gm space from host\n",
- high_gm ? "high" : "low");
+ if (ret) {
+ gvt_err("vgpu%d: failed to allocate %s gm space from host\n",
+ vgpu->id, high_gm ? "high" : "low");
+ gvt_err("vgpu%d: destroying vGPUs, decreasing vGPU memory size or increasing GPU aperture size may resolve this\n",
+ vgpu->id);
+ }
return ret;
}
--
2.26.2
[View Less]
Hi,
Is it possible to dynamically change enumeration list of DRM enumeration
property ? Motivation behind this question is to understand whether it is
possible to create connector enum property (e.g a property which will list
supported output encodings - like yuv420, yuv422 etc) whose list of
supported enum values could be changed dynamically e.g. based on which sink
is connected.
I think there is existing EDID connector property whose value changes based
on connected sink. EDID is a BLOB …
[View More]property, I am trying to understand if
this is also possible for ENUM type property. There is
"drm_property_replace_blob" to replace blob but I wasn't able to find any
API which could replace list of supported enums. Alternatively, would it be
good idea to destroy custom enum property created by a driver and create
new enum property with new list of supported enums e.g when there is a
HOTPLUG event.
Thanks,
-Yogish
[View Less]
Hi all,
The following series add support for the Slimport ANX7625 transmitter, a
ultra-low power Full-HD 4K MIPI to DP transmitter designed for portable device.
This is the v12 version, any mistakes, please let me know, I will fix it in
the next series.
Change history:
v12: Fix comments from Hsin-Yi Wang
- Rebase the code on kernel 5.7, fix DRM interface not match issue.
v11: Fix comments from Rob Herring
- Update commit message.
- Remove unused label.
v10: Fix comments from Rob …
[View More]Herring, Daniel.
- Fix dt_binding_check warning.
- Update description.
v9: Fix comments from Sam, Nicolas, Daniel
- Remove extcon interface.
- Remove DPI support.
- Fix dt_binding_check complains.
- Code clean up and update description.
v8: Fix comments from Nicolas.
- Fix several coding format.
- Update description.
v7:
- Fix critical timing(eg:odd hfp/hbp) in "mode_fixup" interface,
enhance MIPI RX tolerance by setting register MIPI_DIGITAL_ADJ_1 to 0x3D.
Xin Ji (2):
dt-bindings: drm/bridge: anx7625: MIPI to DP transmitter DT schema
drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP
.../bindings/display/bridge/analogix,anx7625.yaml | 95 +
drivers/gpu/drm/bridge/analogix/Kconfig | 9 +
drivers/gpu/drm/bridge/analogix/Makefile | 1 +
drivers/gpu/drm/bridge/analogix/anx7625.c | 1961 ++++++++++++++++++++
drivers/gpu/drm/bridge/analogix/anx7625.h | 397 ++++
5 files changed, 2463 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml
create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c
create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h
--
2.7.4
[View Less]
Another iteration of the split-pagetable support for arm-smmu and the Adreno GPU
SMMU. After email discussions [1] we opted to make a arm-smmu implementation for
specifically for the Adreno GPU and use that to enable split pagetable support
and later other implementation specific bits that we need.
On the hardware side this is very close to the same code from before [2] only
the TTBR1 quirk is turned on by the implementation and not a domain attribute.
In drm/msm we use the returned size of …
[View More]the aperture as a clue to let us know
which virtual address space we should use for global memory objects.
There are two open items that you should be aware of. First, in the
implementation specific code we have to check the compatible string of the
device so that we only enable TTBR1 for the GPU (SID 0) and not the GMU (SID 4).
I went back and forth trying to decide if I wanted to use the compatbile string
or the SID as the filter and settled on the compatible string but I could be
talked out of it.
The other open item is that in drm/msm the hardware only uses 49 bits of the
address space but arm-smmu expects the address to be sign extended all the way
to 64 bits. This isn't a problem normally unless you look at the hardware
registers that contain a IOVA and then the upper bits will be zero. I opted to
restrict the internal drm/msm IOVA range to only 49 bits and then sign extend
right before calling iommu_map / iommu_unmap. This is a bit wonky but I thought
that matching the hardware would be less confusing when debugging a hang.
[1] https://lists.linuxfoundation.org/pipermail/iommu/2020-May/044537.html
[2] https://patchwork.kernel.org/patch/11482591/
Jordan Crouse (6):
iommu/arm-smmu: Pass io-pgtable config to implementation specific
function
iommu/arm-smmu: Add support for split pagetables
dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU
iommu/arm-smmu: Add implementation for the adreno GPU SMMU
drm/msm: Set the global virtual address range from the IOMMU domain
arm6: dts: qcom: sm845: Set the compatible string for the GPU SMMU
.../devicetree/bindings/iommu/arm,smmu.yaml | 4 ++
arch/arm64/boot/dts/qcom/sdm845.dtsi | 2 +-
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 13 ++++++-
drivers/gpu/drm/msm/msm_iommu.c | 7 ++++
drivers/iommu/arm-smmu-impl.c | 6 ++-
drivers/iommu/arm-smmu-qcom.c | 38 ++++++++++++++++++-
drivers/iommu/arm-smmu.c | 32 +++++++++++-----
drivers/iommu/arm-smmu.h | 29 ++++++++++----
8 files changed, 108 insertions(+), 23 deletions(-)
--
2.17.1
[View Less]
"The PM core always increments the runtime usage counter
before calling the ->suspend() callback and decrements it
after calling the ->resume() callback"
DPU and DSI are managed as runtime devices. When
suspend is triggered, PM core adds a refcount on all the
devices and calls device suspend, since usage count is
already incremented, runtime suspend was not getting called
and it kept the clocks on which resulted in target not
entering into XO shutdown.
Add changes to force suspend on …
[View More]runtime devices during pm sleep.
Changes in v1:
- Remove unnecessary checks in the function
_dpu_kms_disable_dpu (Rob Clark).
Changes in v2:
- Avoid using suspend_late to reset the usagecount
as suspend_late might not be called during suspend
call failures (Doug).
Changes in v3:
- Use force suspend instead of managing device usage_count
via runtime put and get API's to trigger callbacks (Doug).
Changes in v4:
- Check the return values of pm_runtime_force_suspend and
pm_runtime_force_resume API's and pass appropriately (Doug).
Changes in v5:
- With v4 patch, test cycle has uncovered issues in device resume.
On bubs: cmd tx failures were seen as SW is sending panel off
commands when the dsi resources are turned off.
Upon suspend, DRM driver will issue a NULL composition to the
dpu, followed by turning off all the HW blocks.
v5 changes will serialize the NULL commit and resource unwinding
by handling them under PM prepare and PM complete phases there by
ensuring that clks are on when panel off commands are being
processed.
Changes in v6:
- Use drm_mode_config_helper_suspend/resume() instead of legacy API
drm_atomic_helper_suspend/resume() (Doug).
Trigger runtime callbacks from the suspend/resume call to turn
off the resources.
Signed-off-by: Kalyan Thota <kalyan_t(a)codeaurora.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +
drivers/gpu/drm/msm/dsi/dsi.c | 2 +
drivers/gpu/drm/msm/msm_drv.c | 67 ++++++++++++++++-----------------
3 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index ce19f1d..b886d9d 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -1123,6 +1123,8 @@ static int __maybe_unused dpu_runtime_resume(struct device *dev)
static const struct dev_pm_ops dpu_pm_ops = {
SET_RUNTIME_PM_OPS(dpu_runtime_suspend, dpu_runtime_resume, NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
};
static const struct of_device_id dpu_dt_match[] = {
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
index 55ea4bc2..62704885 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -161,6 +161,8 @@ static int dsi_dev_remove(struct platform_device *pdev)
static const struct dev_pm_ops dsi_pm_ops = {
SET_RUNTIME_PM_OPS(msm_dsi_runtime_suspend, msm_dsi_runtime_resume, NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
};
static struct platform_driver dsi_driver = {
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 7d985f8..da42ff7 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -1035,75 +1035,74 @@ static int msm_ioctl_submitqueue_close(struct drm_device *dev, void *data,
.patchlevel = MSM_VERSION_PATCHLEVEL,
};
-#ifdef CONFIG_PM_SLEEP
-static int msm_pm_suspend(struct device *dev)
+#ifdef CONFIG_PM
+static int msm_runtime_suspend(struct device *dev)
{
struct drm_device *ddev = dev_get_drvdata(dev);
struct msm_drm_private *priv = ddev->dev_private;
+ struct msm_mdss *mdss = priv->mdss;
- if (WARN_ON(priv->pm_state))
- drm_atomic_state_put(priv->pm_state);
+ DBG("");
- priv->pm_state = drm_atomic_helper_suspend(ddev);
- if (IS_ERR(priv->pm_state)) {
- int ret = PTR_ERR(priv->pm_state);
- DRM_ERROR("Failed to suspend dpu, %d\n", ret);
- return ret;
- }
+ if (mdss && mdss->funcs)
+ return mdss->funcs->disable(mdss);
return 0;
}
-static int msm_pm_resume(struct device *dev)
+static int msm_runtime_resume(struct device *dev)
{
struct drm_device *ddev = dev_get_drvdata(dev);
struct msm_drm_private *priv = ddev->dev_private;
- int ret;
+ struct msm_mdss *mdss = priv->mdss;
- if (WARN_ON(!priv->pm_state))
- return -ENOENT;
+ DBG("");
- ret = drm_atomic_helper_resume(ddev, priv->pm_state);
- if (!ret)
- priv->pm_state = NULL;
+ if (mdss && mdss->funcs)
+ return mdss->funcs->enable(mdss);
- return ret;
+ return 0;
}
#endif
-#ifdef CONFIG_PM
-static int msm_runtime_suspend(struct device *dev)
+#ifdef CONFIG_PM_SLEEP
+static int msm_pm_suspend(struct device *dev)
{
- struct drm_device *ddev = dev_get_drvdata(dev);
- struct msm_drm_private *priv = ddev->dev_private;
- struct msm_mdss *mdss = priv->mdss;
- DBG("");
+ if (pm_runtime_suspended(dev))
+ return 0;
- if (mdss && mdss->funcs)
- return mdss->funcs->disable(mdss);
+ return msm_runtime_suspend(dev);
+}
- return 0;
+static int msm_pm_resume(struct device *dev)
+{
+ if (pm_runtime_suspended(dev))
+ return 0;
+
+ return msm_runtime_resume(dev);
}
-static int msm_runtime_resume(struct device *dev)
+static int msm_pm_prepare(struct device *dev)
{
struct drm_device *ddev = dev_get_drvdata(dev);
- struct msm_drm_private *priv = ddev->dev_private;
- struct msm_mdss *mdss = priv->mdss;
- DBG("");
+ return drm_mode_config_helper_suspend(ddev);
+}
- if (mdss && mdss->funcs)
- return mdss->funcs->enable(mdss);
+static void msm_pm_complete(struct device *dev)
+{
+ struct drm_device *ddev = dev_get_drvdata(dev);
- return 0;
+ drm_mode_config_helper_resume(ddev);
}
#endif
static const struct dev_pm_ops msm_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(msm_pm_suspend, msm_pm_resume)
SET_RUNTIME_PM_OPS(msm_runtime_suspend, msm_runtime_resume, NULL)
+ .prepare = msm_pm_prepare,
+ .complete = msm_pm_complete,
};
/*
--
1.9.1
[View Less]
Hello,
This patch series adds i.MX7 support to the mxsfb driver. The eLCDIF
instance found in the i.MX7 is backward-compatible with the already
supported LCDC v4, but has extended features amongst which the most
notable one is a second plane.
The first 9 patches (01/21 to 09/21) contain miscellaneous cleanups and
refactoring to prepare for what is to come. Patch 10/21 starts the real
work with removal of the DRM simple display pipeline helper, as it
doesn't support multiple planes. The next …
[View More]patch (11/21) is an additional
cleanup.
Patches 12/21 to 14/21 fix vblank handling that I found to be broken
when testing on my device. Patch 15/21 then performs an additional small
cleanup, and patch 16/21 starts official support for i.MX7 by mentioning
it in Kconfig.
Patch 17/21 adds a new device model for the i.MX6SX and i.MX7 eLCDIF.
After three additional cleanups in patches 18/21 to 20/21, patch 21/21
finally adds support for the second plane.
The code is based on drm-misc-next and has been tested on an i.MX7D
platform with a DPI panel.
Laurent Pinchart (21):
drm: mxsfb: Remove fbdev leftovers
drm: mxsfb: Use drm_panel_bridge
drm: mxsfb: Use BIT() macro to define register bitfields
drm: mxsfb: Remove unused macros from mxsfb_regs.h
drm: mxsfb: Clarify format and bus width configuration
drm: mxsfb: Pass mxsfb_drm_private pointer to mxsfb_reset_block()
drm: mxsfb: Use LCDC_CTRL register name explicitly
drm: mxsfb: Remove register definitions from mxsfb_crtc.c
drm: mxsfb: Remove unneeded includes
drm: mxsfb: Stop using DRM simple display pipeline helper
drm: mxsfb: Rename mxsfb_crtc.c to mxsfb_kms.c
drm: mxsfb: Move vblank event arm to CRTC .atomic_flush()
drm: mxsfb: Don't touch AXI clock in IRQ context
drm: mxsfb: Enable vblank handling
drm: mxsfb: Remove mxsfb_devdata unused fields
drm: mxsfb: Add i.MX7 to the list of supported SoCs in Kconfig
drm: mxsfb: Update internal IP version number for i.MX6SX
drm: mxsfb: Drop non-OF support
drm: mxsfb: Turn mxsfb_set_pixel_fmt() into a void function
drm: mxsfb: Merge mxsfb_set_pixel_fmt() and mxsfb_set_bus_fmt()
drm: mxsfb: Support the alpha plane
drivers/gpu/drm/mxsfb/Kconfig | 4 +-
drivers/gpu/drm/mxsfb/Makefile | 2 +-
drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 343 -----------------
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 246 ++++---------
drivers/gpu/drm/mxsfb/mxsfb_drv.h | 42 ++-
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 565 +++++++++++++++++++++++++++++
drivers/gpu/drm/mxsfb/mxsfb_out.c | 99 -----
drivers/gpu/drm/mxsfb/mxsfb_regs.h | 107 +++---
8 files changed, 730 insertions(+), 678 deletions(-)
delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_crtc.c
create mode 100644 drivers/gpu/drm/mxsfb/mxsfb_kms.c
delete mode 100644 drivers/gpu/drm/mxsfb/mxsfb_out.c
--
Regards,
Laurent Pinchart
[View Less]
ti-sn65dsi86 bridge is enumerated as a runtime device.
Adding sleep ops to force runtime_suspend when PM suspend is
requested on the device.
Signed-off-by: Harigovindan P <harigovi(a)codeaurora.org>
---
Changes in v2:
- Include bridge name in the commit message and
remove dependent patchwork link from the commit
text as bridge is independent of OEM(Stephen Boyd)
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/bridge/ti-…
[View More]sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 6ad688b320ae..2eef755b2917 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -159,6 +159,8 @@ static int __maybe_unused ti_sn_bridge_suspend(struct device *dev)
static const struct dev_pm_ops ti_sn_bridge_pm_ops = {
SET_RUNTIME_PM_OPS(ti_sn_bridge_suspend, ti_sn_bridge_resume, NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
};
static int status_show(struct seq_file *s, void *data)
--
2.27.0
[View Less]