From: Stephan Gerhold <stephan(a)gerhold.net>
[ Upstream commit 5c320b6ce7510653bce68cecf80cf5b2d67e907f ]
At the moment, only DRM_MODE_ROTATE_180 is allowed when we try to apply
the rotation from the video mode parameters. It is also useful to allow
DRM_MODE_ROTATE_0 in case there is only a reflect option in the video mode
parameter (e.g. video=540x960,reflect_x).
DRM_MODE_ROTATE_0 means "no rotation" and should therefore not require
any special handling, so we can just add it to the …
[View More]if condition.
Signed-off-by: Stephan Gerhold <stephan(a)gerhold.net>
Signed-off-by: Maxime Ripard <maxime(a)cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200117153429.54700-3-stepha…
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/gpu/drm/drm_client_modeset.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 6d4a29e99ae26..3035584f6dc72 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -951,7 +951,8 @@ bool drm_client_rotation(struct drm_mode_set *modeset, unsigned int *rotation)
* depending on the hardware this may require the framebuffer
* to be in a specific tiling format.
*/
- if ((*rotation & DRM_MODE_ROTATE_MASK) != DRM_MODE_ROTATE_180 ||
+ if (((*rotation & DRM_MODE_ROTATE_MASK) != DRM_MODE_ROTATE_0 &&
+ (*rotation & DRM_MODE_ROTATE_MASK) != DRM_MODE_ROTATE_180) ||
!plane->rotation_property)
return false;
--
2.20.1
[View Less]
From: John Stultz <john.stultz(a)linaro.org>
[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]
I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.
This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of …
[View More]where things went
wrong).
Thanks as always to Sami for his help narrowing this down.
Cc: Rob Clark <robdclark(a)gmail.com>
Cc: Sean Paul <sean(a)poorly.run>
Cc: Sami Tolvanen <samitolvanen(a)google.com>
Cc: Todd Kjos <tkjos(a)google.com>
Cc: Alistair Delva <adelva(a)google.com>
Cc: Amit Pundir <amit.pundir(a)linaro.org>
Cc: Sumit Semwal <sumit.semwal(a)linaro.org>
Cc: freedreno(a)lists.freedesktop.org
Cc: clang-built-linux(a)googlegroups.com
Signed-off-by: John Stultz <john.stultz(a)linaro.org>
Reviewed-by: Nick Desaulniers <ndesaulniers(a)google.com>
Tested-by: Amit Pundir <amit.pundir(a)linaro.org>
Signed-off-by: Rob Clark <robdclark(a)chromium.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 271aa7bbca925..355a60b4a536f 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -336,7 +336,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector *connector)
return num;
}
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
int id = dsi_mgr_connector_get_id(connector);
--
2.20.1
[View Less]
When CONFIG_INIT_ON_ALLOC_DEFAULT_ON the GMU memory allocator runs afoul of
cache coherency issues because it is mapped as write-combine without clearing
the cache after it was zeroed.
Rather than duplicate the hacky workaround we use in the GEM allocator for the
same reason it turns out that we don't need to have a bespoke memory allocator
for the GMU anyway. It uses a flat, global address space and there are only
two relatively minor allocations anyway. In short, this is essentially what the
…
[View More]DMA API was created for so replace a bunch of memory management code with two
calls to allocate and free DMA memory and we're fine.
In a previous version of this series I added the dma-ranges property to the
device tree file for the GMU and updated the bindings to YAML. Rob correctly
pointed out that we didn't need dma-ranges any more but I'm still pushing the
YAML conversion because it is good and we'll eventually need it anyway so why
not.
v4: Use dma_alloc_wc() wrappers per Michael Ruhl.
v3: Fix YAML description per RobH and remove dma-ranges and replace it with the
correct DMA mask in the GMU device. Convert the iova type to a dma_attr_t to
make it 32 bit friendly.
v2: Fix the example bindings for dma-ranges - the third item is the size
Pass false to of_dma_configure so that it fails probe if the DMA region is not
set up.
Jordan Crouse (2):
dt-bindings: display: msm: Convert GMU bindings to YAML
drm/msm/a6xx: Use the DMA API for GMU memory objects
.../devicetree/bindings/display/msm/gmu.txt | 116 -------------------
.../devicetree/bindings/display/msm/gmu.yaml | 123 +++++++++++++++++++++
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 113 ++-----------------
drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 6 +-
4 files changed, 135 insertions(+), 223 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/msm/gmu.txt
create mode 100644 Documentation/devicetree/bindings/display/msm/gmu.yaml
--
2.7.4
[View Less]
Change since v10:
- convert the Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt
to yaml format.
- read the pclk-sample in endpoint.
Changes since v9:
- rename pinctrl-names = "gpiomode", "dpimode" to "active", "idle".
- fix some typo.
Changes since v8:
- drop pclk-sample redefine in mediatek,dpi.txt
- only get the gpiomode and dpimode when dpi->pinctrl is successful.
Changes since v7:
- separate dt-bindings to independent patches.
- move dpi dual edge to one …
[View More]patch.
Changes since v6:
- change dual_edge to pclk-sample
- remove dpi_pin_mode_swap and
Changes since v5:
- fine tune the dt-bindings commit message.
Changes since v4:
- move pin mode control and dual edge control to deveice tree.
- update dt-bindings document for pin mode swap and dual edge control.
Changes since v3:
- add dpi pin mode control when dpi on or off.
- update dpi dual edge comment.
Changes since v2:
- update dt-bindings document for mt8183 dpi.
- separate dual edge modfication as independent patch.
Jitao Shi (6):
dt-bindings: media: add pclk-sample dual edge property
dt-bindings: display: mediatek: control dpi pins mode to avoid leakage
dt-bindings: display: mediatek: dpi sample data in dual edge support
dt-bindings: display: mediatek: convert the document format from txt
to yaml
drm/mediatek: dpi sample mode support
drm/mediatek: set dpi pin mode to gpio low to avoid leakage current
.../display/mediatek/mediatek,dpi.txt | 36 -------
.../display/mediatek/mediatek,dpi.yaml | 100 ++++++++++++++++++
.../bindings/media/video-interfaces.txt | 4 +-
drivers/gpu/drm/mediatek/mtk_dpi.c | 58 +++++++++-
4 files changed, 158 insertions(+), 40 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt
create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml
--
2.21.0
[View Less]
Hi all,
the purpose of this patch series is to address bug reported here
[1]. There where two approaches [2,3] to fix this but non of them get
mainline. The issue is caused by the fact that we are using devres
allocation for the driver (pd,ldb,hdmi,tve) state struct which holds
also the 'struct drm_encoder/connector'.
We need to move the driver state containers containing the drm members
out of the devres memory management into the drm memory management
framework to fix the bug [1]. …
[View More]Therefore we need to split the single
driver state struct into two: one for the drm_connector device and one
for the drm_encoder device.
The series removes some legacy code paths too and removes the useless
imx_drm_encoder_destroy() API.
Pls don't be surprised about the edid memory leak fix patches. I went
this way because those patche can be applied independently of the last
patch which did the conversion from the devres alloc to the non-devres
alloc.
I did the following tests for each component:
- probe successful
- correct failure handling during probe
- bind / unbind (module load/unload)
I also kept a few lines longer than 80char to improve readability.
Other tester are welcome =)
Regards,
Marco
[1] https://www.spinics.net/lists/dri-devel/msg189388.html
[2] https://lkml.org/lkml/2018/10/16/1148
[3] https://lkml.org/lkml/2019/4/2/612
Marco Felsch (17):
drm/imx: drop useless best_encoder callback
drm/imx: parallel-display: fix edid memory leak
drm/imx: parallel-display: move panel/bridge detection to fail early
drm/imx: parallel-display: detach panel within drm_encoder destroy
drm/imx: parallel-display: split encoder and decoder states
imx/drm: parallel-display: split attach function
drm/imx: tve: add regulator_disable devm_action
drm/imx: tve: split global state container
drm/imx: imx-ldb: remove useless enum
drm/imx: imx-ldb: fix edid memory leak
drm/imx: imx-ldb: release ldb-channel resources within encoder destroy
drm/imx: remove imx_drm_encoder_destroy helper
drm/imx: imx-ldb: split imx_ldb devres allocation context
drm/imx: imx-ldb: add ldb_is_dual helper
drm/imx: imx-ldb: split encoder and decoder states
drm/imx: imx-ldb: refactor imx_ldb_bind
drm/imx: fix drm_mode_config_cleanup race condition
drivers/gpu/drm/imx/dw_hdmi-imx.c | 28 +-
drivers/gpu/drm/imx/imx-drm-core.c | 9 +-
drivers/gpu/drm/imx/imx-drm.h | 1 -
drivers/gpu/drm/imx/imx-ldb.c | 514 ++++++++++++++-----------
drivers/gpu/drm/imx/imx-tve.c | 173 ++++++---
drivers/gpu/drm/imx/ipuv3-crtc.c | 28 +-
drivers/gpu/drm/imx/parallel-display.c | 142 ++++---
7 files changed, 523 insertions(+), 372 deletions(-)
--
2.20.1
[View Less]