[PATCH v13 1/6] dt-bindings: media: add pclk-sample dual edge property

2020-03-11 Thread Jitao Shi
Some chips's sample mode are rising, falling and dual edge (both falling and rising edge). Extern the pclk-sample property to support dual edge. Acked-by: Rob Herring Reviewed-by: CK Hu Signed-off-by: Jitao Shi --- Documentation/devicetree/bindings/media/video-interfaces.txt | 4 ++-- 1 file c

[PATCH v13 4/6] dt-bindings: display: mediatek: convert the document format from txt to yaml

2020-03-11 Thread Jitao Shi
Signed-off-by: Jitao Shi --- .../display/mediatek/mediatek,dpi.txt | 45 .../display/mediatek/mediatek,dpi.yaml| 103 ++ 2 files changed, 103 insertions(+), 45 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,d

[PATCH v13 6/6] drm/mediatek: set dpi pin mode to gpio low to avoid leakage current

2020-03-11 Thread Jitao Shi
Config dpi pins mode to output and pull low when dpi is disabled. Aovid leakage current from some dpi pins (Hsync Vsync DE ... ). Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 31 ++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/me

[PATCH v13 2/6] dt-bindings: display: mediatek: control dpi pins mode to avoid leakage

2020-03-11 Thread Jitao Shi
Add property "pinctrl-names" to swap pin mode between gpio and dpi mode. Set the dpi pins to gpio mode and output-low to avoid leakage current when dpi disabled. Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dpi.txt | 7 +++ 1 file changed, 7 insertions(+)

[PATCH v13 5/6] drm/mediatek: dpi sample mode support

2020-03-11 Thread Jitao Shi
DPI can sample on falling, rising or both edge. When DPI sample the data both rising and falling edge. It can reduce half data io pins. Reviewed-by: CK Hu Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_dpi.c | 27 +-- 1 file changed, 25 insertions(+), 2 deleti

[PATCH v13 3/6] dt-bindings: display: mediatek: dpi sample data in dual edge support

2020-03-11 Thread Jitao Shi
Add property "pclk-sample" to config the dpi sample on falling (0), rising (1), both falling and rising (2). Acked-by: Rob Herring Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dpi.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/de

[PATCH v13 0/6] mt8183 dpi supports dual edge and pin mode swap

2020-03-11 Thread Jitao Shi
Changes since v12: - fix mediatek,dpi.yaml make_dt_binding_check errors. Change since v11: - fine tune mediatek,dpi.yaml. - add Acked-by: Rob Herring . Change since v10: - convert the Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt to yaml format. - read the pclk-samp

[PATCH] drm/ttm: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Takashi Iwai
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Takashi Iwai
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai --- drivers/gpu/drm/drm_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v3 2/4] dt-bindings: display: mediatek: get mipitx calibration data from nvmem

2020-03-11 Thread Jitao Shi
Add properties to get get mipitx calibration data. Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dsi.txt| 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt b/Documentation/devicetree/b

[PATCH v3 3/4] drm/mediatek: add the mipitx driving control

2020-03-11 Thread Jitao Shi
Add a property in device tree to control the driving by different board. Reviewed-by: Matthias Brugger Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_mipi_tx.c| 6 ++ drivers/gpu/drm/mediatek/mtk_mipi_tx.h| 1 + drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c | 7 ++

[PATCH v3 1/4] dt-bindings: display: mediatek: add property to control mipi tx drive current

2020-03-11 Thread Jitao Shi
Add a property to control mipi tx drive current: "drive-strength-microamp" Signed-off-by: Jitao Shi --- .../devicetree/bindings/display/mediatek/mediatek,dsi.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dsi.txt b/Do

[PATCH v3 4/4] drm/mediatek: config mipitx impedance with calibration data

2020-03-11 Thread Jitao Shi
Read calibration data from nvmem, and config mipitx impedance with calibration data to make sure their impedance are 100ohm. Signed-off-by: Jitao Shi --- drivers/gpu/drm/mediatek/mtk_mt8183_mipi_tx.c | 57 +++ 1 file changed, 57 insertions(+) diff --git a/drivers/gpu/drm/mediate

[PATCH v3 0/4] Config mipi tx drive current and impedance

2020-03-11 Thread Jitao Shi
Changes since v2: - fix the title of commit message. - rename mipitx-current-drive to drive-strength-microamp Changes since v1: - fix coding style. - change mtk_mipi_tx_config_calibration_data() to void Jitao Shi (4): dt-bindings: display: mediatek: add property to control mipi tx drive

Re: [PATCH] drm/ttm: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Huang Rui
On Wed, Mar 11, 2020 at 03:34:52PM +0800, Takashi Iwai wrote: > Since snprintf() returns the would-be-output size instead of the > actual output size, the succeeding calls may go beyond the given > buffer limit. Fix it by replacing with scnprintf(). > > Signed-off-by: Takashi Iwai Reviewed-by:

Re: [PATCH] drm/ttm: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Christian König
Am 11.03.20 um 08:52 schrieb Huang Rui: On Wed, Mar 11, 2020 at 03:34:52PM +0800, Takashi Iwai wrote: Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off

Re: [PATCH] drm/ttm: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Takashi Iwai
On Wed, 11 Mar 2020 08:56:11 +0100, Christian K6nig wrote: > > Am 11.03.20 um 08:52 schrieb Huang Rui: > > On Wed, Mar 11, 2020 at 03:34:52PM +0800, Takashi Iwai wrote: > >> Since snprintf() returns the would-be-output size instead of the > >> actual output size, the succeeding calls may go beyond

Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Thomas Zimmermann
Hi Takashi Am 11.03.20 um 08:35 schrieb Takashi Iwai: > Since snprintf() returns the would-be-output size instead of the > actual output size, the succeeding calls may go beyond the given > buffer limit. Fix it by replacing with scnprintf(). > > Signed-off-by: Takashi Iwai > --- > drivers/gpu/

Re: [PATCH v2 14/17] drm/i915: have *_debugfs_init() functions return void.

2020-03-11 Thread Jani Nikula
On Tue, 10 Mar 2020, Wambui Karuga wrote: > Since commit 987d65d01356 (drm: debugfs: make > drm_debugfs_create_files() never fail), drm_debugfs_create_files() never > fails and should return void. Therefore, remove its use as the > return value of debugfs_init() functions and have the functions re

Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Takashi Iwai
On Wed, 11 Mar 2020 09:10:56 +0100, Thomas Zimmermann wrote: > > Hi Takashi > > Am 11.03.20 um 08:35 schrieb Takashi Iwai: > > Since snprintf() returns the would-be-output size instead of the > > actual output size, the succeeding calls may go beyond the given > > buffer limit. Fix it by replaci

[PATCH v8 02/12] drm/i915: Use 64-bit division macro

2020-03-11 Thread Guru Das Srinagesh
Since the PWM framework is switching struct pwm_state.duty_cycle's datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL to handle a 64-bit dividend. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: David Airlie Cc: Daniel Vetter Cc: Chris Wilson Cc: "Ville Syrjälä" Cc: intel-...@lis

Re: [PATCH V3 1/4] backlight: qcom-wled: convert the wled bindings to .yaml format

2020-03-11 Thread kgunda
On 2020-03-10 20:31, Daniel Thompson wrote: On Mon, Mar 09, 2020 at 06:55:59PM +0530, Kiran Gunda wrote: Convert the qcom-wled bindings from .txt to .yaml format. Signed-off-by: Kiran Gunda Acked-by: Daniel Thompson Thanks. --- .../bindings/leds/backlight/qcom-wled.txt | 154

[PATCH v8 11/12] backlight: pwm_bl: Use 64-bit division function

2020-03-11 Thread Guru Das Srinagesh
Since the PWM framework is switching struct pwm_state.period's datatype to u64, prepare for this transition by using div_u64 to handle a 64-bit dividend instead of a straight division operation. Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Bartlomiej Zolnierkiewicz Cc: linux-...@vger.k

Re: [PATCH -next 013/491] INGENIC JZ47xx SoCs: Use fallthrough;

2020-03-11 Thread Miquel Raynal
Hi Joe, Joe Perches wrote on Tue, 10 Mar 2020 21:51:27 -0700: > Convert the various uses of fallthrough comments to fallthrough; > > Done via script > Link: > https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/ > > Signed-off-by: Joe Perches > --- >

[PATCH -next 000/491] treewide: use fallthrough;

2020-03-11 Thread Joe Perches
There is a new fallthrough pseudo-keyword macro that can be used to replace the various /* fallthrough */ style comments that are used to indicate a case label code block is intended to fallthrough to the next case label block. See commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pse

Re: [PATCH V3 3/4] backlight: qcom-wled: Add support for WLED5 peripheral in PM8150L

2020-03-11 Thread kgunda
On 2020-03-10 21:15, Daniel Thompson wrote: On Mon, Mar 09, 2020 at 06:56:01PM +0530, Kiran Gunda wrote: Add support for WLED5 peripheral that is present on PM8150L PMICs. PM8150L WLED supports the following: - Two modulators and each sink can use any of the modulator - Multiple CABC se

Re: [PATCH V3 1/4] backlight: qcom-wled: convert the wled bindings to .yaml format

2020-03-11 Thread kgunda
On 2020-03-11 00:01, Rob Herring wrote: On Mon, 9 Mar 2020 18:55:59 +0530, Kiran Gunda wrote: Convert the qcom-wled bindings from .txt to .yaml format. Signed-off-by: Kiran Gunda --- .../bindings/leds/backlight/qcom-wled.txt | 154 - .../bindings/leds/backlight/qcom

[PATCH v8 00/12] Convert PWM period and duty cycle to u64

2020-03-11 Thread Guru Das Srinagesh
Because period and duty cycle are defined in the PWM framework structs as ints with units of nanoseconds, the maximum time duration that can be set is limited to ~2.147 seconds. Consequently, applications desiring to set greater time periods via the PWM framework are not be able to do so - like, fo

Re: [PATCH v4] drm/i915: Init lspcon after HPD in intel_dp_detect()

2020-03-11 Thread Kai-Heng Feng
> On Feb 15, 2020, at 01:56, Kai-Heng Feng wrote: > > On HP 800 G4 DM, if HDMI cable isn't plugged before boot, the HDMI port > becomes useless and never responds to cable hotplugging: > [3.031904] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon > [3.031945] [drm:intel_ddi_init

Re: [PATCH V3 2/4] backlight: qcom-wled: Add callback functions

2020-03-11 Thread kgunda
On 2020-03-10 20:57, Daniel Thompson wrote: On Mon, Mar 09, 2020 at 06:56:00PM +0530, Kiran Gunda wrote: Add cabc_config, sync_toggle, wled_ovp_fault_status and wled_ovp_delay callback functions to prepare the driver for adding WLED5 support. Signed-off-by: Kiran Gunda Overall this code woul

Re: [PATCH v2] drm/bridge: analogix_dp: Split bind() into probe() and real bind()

2020-03-11 Thread Andy Yan
On 3/10/20 6:34 PM, Marek Szyprowski wrote: Analogix_dp driver acquires all its resources in the ->bind() callback, what is a bit against the component driver based approach, where the driver initialization is split into a probe(), where all resources are gathered, and a bind(), where all objects

[PATCH] staging: fbtft: Remove prohibited spaces before ')'

2020-03-11 Thread Marcio Albano
Fix checkpatch errors: "ERROR: space prohibited before that close parenthesis ')'" in fbtft-bus.c:65 and fbtft-bus.c:67. Signed-off-by: Marcio Albano --- drivers/staging/fbtft/fbtft-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c

Re: WARNING in idr_destroy

2020-03-11 Thread syzbot
syzbot has bisected this bug to: commit 5b3709793d151e6e12eb6a38a5da3f7fc2923d3a Author: Thomas Zimmermann Date: Wed May 8 08:26:19 2019 + drm/ast: Convert AST driver to |struct drm_gem_vram_object| bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15a66fb5e0 start comm

Re: [PATCH] drm/rockchip: rgb: don't count non-existent devices when determining subdrivers

2020-03-11 Thread Heiko Stuebner
Am Dienstag, 21. Januar 2020, 23:48:28 CET schrieb Heiko Stuebner: > From: Heiko Stuebner > > rockchip_drm_endpoint_is_subdriver() may also return error codes. > For example if the target-node is in the disabled state, so no > platform-device is getting created for it. > > In that case current c

Re: [PATCH 03/51] drm: add managed resources tied to drm_device

2020-03-11 Thread Thomas Zimmermann
Hi Daniel Am 02.03.20 um 23:25 schrieb Daniel Vetter: > We have lots of these. And the cleanup code tends to be of dubious > quality. The biggest wrong pattern is that developers use devm_, which > ties the release action to the underlying struct device, whereas > all the userspace visible stuff a

Re: [PATCH 04/51] drm: Set final_kfree in drm_dev_alloc

2020-03-11 Thread Thomas Zimmermann
Am 02.03.20 um 23:25 schrieb Daniel Vetter: > I also did a full review of all callers, and only the xen driver > forgot to call drm_dev_put in the failure path. Fix that up too. > > v2: I noticed that xen has a drm_driver.release hook, and uses > drm_dev_alloc(). We need to remove the kfree from

Re: [PATCH 06/51] drm/udl: Use drmm_add_final_kfree

2020-03-11 Thread Thomas Zimmermann
Am 02.03.20 um 23:25 schrieb Daniel Vetter: > With this we can drop the final kfree from the release function. > > v2: We need drm_dev_put to unroll the driver creation (once > drm_dev_init and drmm_add_final_kfree suceeded), otherwise > the drmm_ magic doesn't happen. > > v3: Actually squash i

Re: [PATCH 03/51] drm: add managed resources tied to drm_device

2020-03-11 Thread Thomas Zimmermann
Am 02.03.20 um 23:25 schrieb Daniel Vetter: <...> > + > +int __drmm_add_action(struct drm_device *dev, > + drmres_release_t action, > + void *data, const char *name) > +{ > + struct drmres *dr; > + void **void_ptr; > + > + dr = alloc_dr(action, data

Re: [PATCH 19/51] drm: Cleanups after drmm_add_final_kfree rollout

2020-03-11 Thread Thomas Zimmermann
Am 02.03.20 um 23:25 schrieb Daniel Vetter: > A few things: > - Update the example driver in the documentation. > - We can drop the old kfree in drm_dev_release. > - Add a WARN_ON check in drm_dev_register to make sure everyone calls > drmm_add_final_kfree and there's no leaks. > > Signed-off-

Re: [PATCH 20/51] drm: Handle dev->unique with drmm_

2020-03-11 Thread Thomas Zimmermann
Am 02.03.20 um 23:26 schrieb Daniel Vetter: > We need to add a drmm_kstrdup for this, but let's start somewhere. > > This is not exactly perfect onion unwinding, but it's jsut a kfree so > doesn't really matter at all. > > Signed-off-by: Daniel Vetter Acked-by: Thomas Zimmermann > --- > dr

Re: [PATCH 21/51] drm: Use drmm_ for drm_dev_init cleanup

2020-03-11 Thread Thomas Zimmermann
Hi Am 02.03.20 um 23:26 schrieb Daniel Vetter: > Well for the simple stuff at least, vblank, gem and minor cleanup I > want to further split up as a demonstration. > > v2: We need to clear drm_device->dev otherwise the debug drm printing > after our cleanup hook (e.g. in drm_manged_release) will

Re: [PATCH 03/51] drm: add managed resources tied to drm_device

2020-03-11 Thread Thomas Zimmermann
Am 11.03.20 um 10:07 schrieb Thomas Zimmermann: > Hi Daniel > > Am 02.03.20 um 23:25 schrieb Daniel Vetter: >> We have lots of these. And the cleanup code tends to be of dubious >> quality. The biggest wrong pattern is that developers use devm_, which >> ties the release action to the underlying

Re: [PATCH V2] drm/imx: parallel-display: Adjust bus_flags handling

2020-03-11 Thread Philipp Zabel
Hi Marek, On Mon, 2020-03-09 at 21:18 +0100, Marek Vasut wrote: > The bus_flags handling logic does not seem to cover all potential > usecases. Specifically, this seems to fail with an "edt,etm0700g0edh6" > display attached to an 24bit display interface, with interface-pix-fmt > = "rgb24" set in D

Re: [PATCH 22/51] drm: manage drm_minor cleanup with drmm_

2020-03-11 Thread Thomas Zimmermann
Hi Am 02.03.20 um 23:26 schrieb Daniel Vetter: > The cleanup here is somewhat tricky, since we can't tell apart the > allocated minor index from 0. So register a cleanup action first, and > if the index allocation fails, unregister that cleanup action again to > avoid bad mistakes. > > The kdev f

Re: [PATCH v8 11/12] backlight: pwm_bl: Use 64-bit division function

2020-03-11 Thread Daniel Thompson
On Tue, Mar 10, 2020 at 06:41:20PM -0700, Guru Das Srinagesh wrote: > Since the PWM framework is switching struct pwm_state.period's datatype > to u64, prepare for this transition by using div_u64 to handle a 64-bit > dividend instead of a straight division operation. > > Cc: Lee Jones > Cc: Dani

Re: [PATCH v3 2/2] arm64: dts: renesas: Add HiHope RZ/G2M board with idk-1110wr display

2020-03-11 Thread Geert Uytterhoeven
Hi Lad, On Tue, Mar 10, 2020 at 9:42 PM Lad Prabhakar wrote: > From: Fabrizio Castro > > The HiHope RZ/G2M is advertised as compatible with panel idk-1110wr > from Advantech, however the panel isn't sold alongside the board. > A new dts, adding everything that's required to get the panel to > wo

Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Thomas Zimmermann
Hi Am 11.03.20 um 09:24 schrieb Takashi Iwai: > On Wed, 11 Mar 2020 09:10:56 +0100, > Thomas Zimmermann wrote: >> >> Hi Takashi >> >> Am 11.03.20 um 08:35 schrieb Takashi Iwai: >>> Since snprintf() returns the would-be-output size instead of the >>> actual output size, the succeeding calls may go

Re: [PATCH V3 2/4] backlight: qcom-wled: Add callback functions

2020-03-11 Thread Daniel Thompson
On Wed, Mar 11, 2020 at 12:11:00PM +0530, kgu...@codeaurora.org wrote: > On 2020-03-10 20:57, Daniel Thompson wrote: > > On Mon, Mar 09, 2020 at 06:56:00PM +0530, Kiran Gunda wrote: > > > Add cabc_config, sync_toggle, wled_ovp_fault_status and wled_ovp_delay > > > callback functions to prepare the

Re: [RFC PATCH 0/8] *** Per context fencing ***

2020-03-11 Thread Gerd Hoffmann
Hi, > I should've been more clear -- this is an internal cleanup/preparation and > the per-context changes are invisible to host userspace. Ok, it wasn't clear that you don't flip the switch yet. In general the commit messages could be a bit more verbose ... I'm wondering though why we need t

Re: [PATCH -next 019/491] Hyper-V CORE AND DRIVERS: Use fallthrough;

2020-03-11 Thread Wei Liu
On Tue, Mar 10, 2020 at 09:51:33PM -0700, Joe Perches wrote: > Convert the various uses of fallthrough comments to fallthrough; > > Done via script > Link: > https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/ > > Signed-off-by: Joe Perches Reviewed-by

Re: [PATCH v4] drm/i915: Init lspcon after HPD in intel_dp_detect()

2020-03-11 Thread Ville Syrjälä
On Sat, Feb 15, 2020 at 01:56:27AM +0800, Kai-Heng Feng wrote: > On HP 800 G4 DM, if HDMI cable isn't plugged before boot, the HDMI port > becomes useless and never responds to cable hotplugging: > [3.031904] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon > [3.031945] [drm:intel_dd

Re: [PATCH] drm: rework SET_MASTER and DROP_MASTER perm handling

2020-03-11 Thread Emil Velikov
On Mon, 9 Mar 2020 at 18:36, Emil Velikov wrote: > > On Mon, 9 Mar 2020 at 13:13, Emil Velikov wrote: > > > > OTOH, if applications exist that rely on drop-master failing in this > > > specific case, making drop-master succeed would break them. That might > > > include a buggy set-master path tha

Re: [PATCH v11 0/5] arm/arm64: mediatek: Fix mt8173 mmsys device probing

2020-03-11 Thread CK Hu
Hi, Enric: I'm confused this is v11 or v12. For v12, you've lost some 'Acked-by' and 'Reviewed-by' tag. Regards, CK On Wed, 2020-03-11 at 12:56 +0100, Enric Balletbo i Serra wrote: > Dear all, > > These patches are intended to solve an old standing issue on some > Mediatek devices (mt8173, mt27

Re: [PATCH v11 3/5] clk / soc: mediatek: Move mt8173 MMSYS to platform driver

2020-03-11 Thread CK Hu
Hi, Enric: On Wed, 2020-03-11 at 12:56 +0100, Enric Balletbo i Serra wrote: > From: Matthias Brugger > > There is no strong reason for this to use CLK_OF_DECLARE instead of > being a platform driver. Plus, MMSYS provides clocks but also a shared > register space for the mediatek-drm and the medi

Re: [PATCH v11 4/5] soc / drm: mediatek: Move routing control to mmsys device

2020-03-11 Thread CK Hu
Hi, Enric: On Wed, 2020-03-11 at 12:56 +0100, Enric Balletbo i Serra wrote: > Provide a mtk_mmsys_ddp_connect() and mtk_mmsys_disconnect() functions to > replace mtk_ddp_add_comp_to_path() and mtk_ddp_remove_comp_from_path(). > Those functions will allow DRM driver and others to control the data >

Re: [PATCH 3/3] RFC: dma-buf: Add an API for importing and exporting sync files (v4)

2020-03-11 Thread Christian König
Am 11.03.20 um 04:43 schrieb Jason Ekstrand: Explicit synchronization is the future. At least, that seems to be what most userspace APIs are agreeing on at this point. However, most of our Linux APIs (both userspace and kernel UAPI) are currently built around implicit synchronization with dma-b

[PATCH] DRM: ARC: PGU: interlaced mode not supported

2020-03-11 Thread Eugeniy Paltsev
Filter out interlaced modes as they are not supported by ARC PGU hardware. Signed-off-by: Eugeniy Paltsev --- drivers/gpu/drm/arc/arcpgu_crtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c index 8ae1e1f97a73..c85406

Re: [PATCH] DRM: ARC: PGU: interlaced mode not supported

2020-03-11 Thread Greg KH
On Wed, Mar 11, 2020 at 04:13:10PM +0300, Eugeniy Paltsev wrote: > Filter out interlaced modes as they are not supported by ARC PGU > hardware. > > Signed-off-by: Eugeniy Paltsev > --- > drivers/gpu/drm/arc/arcpgu_crtc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/dr

Re: [PATCH v11 4/5] soc / drm: mediatek: Move routing control to mmsys device

2020-03-11 Thread CK Hu
On Wed, 2020-03-11 at 14:25 +0100, Matthias Brugger wrote: > > On 11/03/2020 14:07, CK Hu wrote: > > Hi, Enric: > > > > On Wed, 2020-03-11 at 12:56 +0100, Enric Balletbo i Serra wrote: > >> Provide a mtk_mmsys_ddp_connect() and mtk_mmsys_disconnect() functions to > >> replace mtk_ddp_add_comp_to_

Re: [PATCH v11 5/5] soc / drm: mediatek: Fix mediatek-drm device probing

2020-03-11 Thread CK Hu
On Wed, 2020-03-11 at 14:26 +0100, Matthias Brugger wrote: > > On 11/03/2020 12:56, Enric Balletbo i Serra wrote: > > In the actual implementation the same compatible string > > "mediatek,-mmsys" is used to bind the clock drivers > > (drivers/soc/mediatek) as well as to the gpu driver > > (drivers

Re: [PATCH v13 6/6] drm/mediatek: set dpi pin mode to gpio low to avoid leakage current

2020-03-11 Thread Chun-Kuang Hu
Jitao Shi 於 2020年3月11日 週三 下午3:19寫道: > Config dpi pins mode to output and pull low when dpi is disabled. > Aovid leakage current from some dpi pins (Hsync Vsync DE ... ). > > Reviewed-by: Chun-Kuang Hu > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 31

Re: [PATCH v13 2/6] dt-bindings: display: mediatek: control dpi pins mode to avoid leakage

2020-03-11 Thread Chun-Kuang Hu
Jitao Shi 於 2020年3月11日 週三 下午3:18寫道: > Add property "pinctrl-names" to swap pin mode between gpio and dpi mode. > Set > the dpi pins to gpio mode and output-low to avoid leakage current when dpi > disabled. > Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Jitao Shi > --- > .../devicetree/bind

P2P for DMA-buf

2020-03-11 Thread Christian König
This is the third and final part of my series to start supporting P2P with DMA-buf. The implementation is straight forward, apart from a helper to aid constructing scatterlists without having struct pages we only add a new flag indicating that an DMA-buf importer can handle peer2peer. The expo

[PATCH 3/6] drm/amdgpu: note that we can handle peer2peer DMA-buf

2020-03-11 Thread Christian König
Importing should work out of the box. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index ffeb20f11c07..aef12ee2f1e3 100

[PATCH 1/6] lib/scatterlist: add sg_set_dma_addr() function

2020-03-11 Thread Christian König
This can be used by drivers to setup P2P DMA between device memory which is not backed by struct pages. The drivers of the involved devices are responsible for setting up and tearing down DMA addresses as necessary using dma_map_resource(). The page pointer is set to NULL and only the DMA address

[PATCH 2/6] dma-buf: add peer2peer flag

2020-03-11 Thread Christian König
Add a peer2peer flag noting that the importer can deal with device resources which are not backed by pages. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 2 ++ include/linux/dma-buf.h | 10 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/dma-buf/dma-buf.c b

[PATCH 4/6] drm/amdgpu: add checks if DMA-buf P2P is supported

2020-03-11 Thread Christian König
Check if we can do peer2peer on the PCIe bus. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index aef12ee2f1e3..bbf6

[PATCH 5/6] drm/amdgpu: add support for exporting VRAM using DMA-buf v2

2020-03-11 Thread Christian König
We should be able to do this now after checking all the prerequisites. v2: fix entrie count in the sgt Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 56 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 12 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_

[PATCH 6/6] drm/amdgpu: improve amdgpu_gem_info debugfs file

2020-03-11 Thread Christian König
Note if a buffer was imported using peer2peer. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 4277125a79ee..

Re: [PATCH v13 1/6] dt-bindings: media: add pclk-sample dual edge property

2020-03-11 Thread Neil Armstrong
Hi, On 11/03/2020 08:18, Jitao Shi wrote: > Some chips's sample mode are rising, falling and dual edge (both > falling and rising edge). > Extern the pclk-sample property to support dual edge. > > Acked-by: Rob Herring > Reviewed-by: CK Hu > Signed-off-by: Jitao Shi > --- > Documentation/devi

Re: [PATCH v13 5/6] drm/mediatek: dpi sample mode support

2020-03-11 Thread Neil Armstrong
On 11/03/2020 08:18, Jitao Shi wrote: > DPI can sample on falling, rising or both edge. > When DPI sample the data both rising and falling edge. > It can reduce half data io pins. > > Reviewed-by: CK Hu > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 27 +

Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Thomas Zimmermann
Am 11.03.20 um 09:24 schrieb Takashi Iwai: > On Wed, 11 Mar 2020 09:10:56 +0100, > Thomas Zimmermann wrote: >> >> Hi Takashi >> >> Am 11.03.20 um 08:35 schrieb Takashi Iwai: >>> Since snprintf() returns the would-be-output size instead of the >>> actual output size, the succeeding calls may go be

Re: [PATCH 4/6] drm/amdgpu: add checks if DMA-buf P2P is supported

2020-03-11 Thread Christian König
Am 11.03.20 um 15:04 schrieb Jason Gunthorpe: On Wed, Mar 11, 2020 at 02:51:56PM +0100, Christian König wrote: Check if we can do peer2peer on the PCIe bus. Signed-off-by: Christian König drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 1 file changed, 4 insertions(+) diff --git a/dri

Re: [PATCH 10/21] drm/tegra: remove checks for debugfs functions return value

2020-03-11 Thread Thierry Reding
On Thu, Feb 27, 2020 at 03:02:21PM +0300, Wambui Karuga wrote: > Since 987d65d01356 (drm: debugfs: make > drm_debugfs_create_files() never fail) there is no need to check the > return value of drm_debugfs_create_files(). Therefore, remove the > return checks and error handling of the drm_debugfs_cr

Re: [PATCH 4/6] drm/amdgpu: add checks if DMA-buf P2P is supported

2020-03-11 Thread Christian König
Am 11.03.20 um 15:38 schrieb Jason Gunthorpe: On Wed, Mar 11, 2020 at 03:33:01PM +0100, Christian König wrote: Am 11.03.20 um 15:04 schrieb Jason Gunthorpe: On Wed, Mar 11, 2020 at 02:51:56PM +0100, Christian König wrote: Check if we can do peer2peer on the PCIe bus. Signed-off-by: Christian

Re: [PATCH 08/33] drm/panel-sony-acx424akp: Fix dotclocks

2020-03-11 Thread Ville Syrjälä
On Sat, Mar 07, 2020 at 03:40:11PM +0100, Linus Walleij wrote: > On Mon, Mar 2, 2020 at 9:35 PM Ville Syrjala > wrote: > > > From: Ville Syrjälä > > > > The currently listed dotclocks disagree with the currently > > listed vrefresh rates. Change the dotclocks to match the vrefresh. > > > > Someo

Re: [PATCH 06/33] drm/panel-lg-lg4573: Fix dotclock

2020-03-11 Thread Ville Syrjälä
On Tue, Mar 03, 2020 at 06:24:25AM +0100, Heiko Schocher wrote: > Hello Ville Syrjala, > > Am 02.03.2020 um 21:34 schrieb Ville Syrjala: > > From: Ville Syrjälä > > > > The currently listed dotclock disagrees with the currently > > listed vrefresh rate. Change the dotclock to match the vrefresh.

Re: [PATCH v2 01/33] drm/panel-novatek-nt35510: Fix dotclock

2020-03-11 Thread Ville Syrjälä
On Mon, Mar 09, 2020 at 04:33:19PM +0100, Linus Walleij wrote: > On Mon, Mar 9, 2020 at 2:36 PM Ville Syrjala > wrote: > > > From: Ville Syrjälä > > > > The dotclock is three orders of magnitude out. Fix it. > > > > v2: Just set it to 20MHz (Linus) > > > > Cc: Linus Walleij > > Cc: Sam Ravnborg

Re: [PATCH 21/33] drm/panel-simple: Fix dotclock for Logic PD Type 28

2020-03-11 Thread Ville Syrjälä
On Tue, Mar 03, 2020 at 07:00:12AM -0600, Adam Ford wrote: > On Mon, Mar 2, 2020 at 2:36 PM Ville Syrjala > wrote: > > > > From: Ville Syrjälä > > > > The currently listed dotclock disagrees with the currently > > listed vrefresh rate. Change the dotclock to match the vrefresh. > > > > Someone te

Re: [PATCH v2 04/33] drm/panel-ilitek-ili9322: Fix dotclocks

2020-03-11 Thread Ville Syrjälä
On Mon, Mar 09, 2020 at 04:33:56PM +0100, Linus Walleij wrote: > On Mon, Mar 9, 2020 at 2:38 PM Ville Syrjala > wrote: > > > From: Ville Syrjälä > > > > The listed dotclocks are two orders of mangnitude out. > > Fix them. > > > > v2: Just divide everything by 100 (Linus) > > > > Cc: Linus Wallei

[PATCHv7 2/6] drm/core: Add drm_afbc_framebuffer and a corresponding helper

2020-03-11 Thread Andrzej Pietrasiewicz
The new struct contains afbc-specific data. The new function can be used by drivers which support afbc to complete the preparation of struct drm_afbc_framebuffer. It must be called after allocating the said struct and calling drm_gem_fb_init_with_funcs(). Signed-off-by: Andrzej Pietrasiewicz ---

[PATCHv7 0/6] Add AFBC support for Rockchip

2020-03-11 Thread Andrzej Pietrasiewicz
This series adds AFBC support for Rockchip. It is inspired by: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/refs/heads/factory-gru-9017.B-chromeos-4.4/drivers/gpu/drm/rockchip/rockchip_drm_vop.c This is the seventh iteration of the afbc series, which addresses comments receiv

[PATCHv7 3/6] drm/arm/malidp: Factor-in framebuffer creation

2020-03-11 Thread Andrzej Pietrasiewicz
Consolidating framebuffer creation into one function will make it easier to transition to generic afbc-aware helpers. Signed-off-by: Andrzej Pietrasiewicz --- drivers/gpu/drm/arm/malidp_drv.c | 157 +-- 1 file changed, 66 insertions(+), 91 deletions(-) diff --git a/d

[PATCHv7 1/6] drm/core: Allow drivers allocate a subclass of struct drm_framebuffer

2020-03-11 Thread Andrzej Pietrasiewicz
Allow allocating a specialized version of struct drm_framebuffer by moving the actual fb allocation out of drm_gem_fb_create_with_funcs(); the respective functions names are adjusted to reflect that fact. Please note, though, that standard size checks are performed on buffers, so the drm_gem_fb_ini

[PATCHv7 5/6] drm/arm/malidp: Switch to afbc helpers

2020-03-11 Thread Andrzej Pietrasiewicz
Use available afbc helpers. Signed-off-by: Andrzej Pietrasiewicz --- drivers/gpu/drm/arm/malidp_drv.c | 44 +++- 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index b9715b19af94..bae5

[PATCHv7 4/6] drm/arm/malidp: Allocate an afbc-specific drm_framebuffer

2020-03-11 Thread Andrzej Pietrasiewicz
Prepare for using generic afbc helpers. Use an existing helper which allows allocating a struct drm_framebuffer in the driver. afbc-specific checks should go after drm_gem_fb_init_with_funcs(). Signed-off-by: Andrzej Pietrasiewicz --- drivers/gpu/drm/arm/malidp_drv.c | 50 +

[PATCHv7 6/6] drm/rockchip: Add support for afbc

2020-03-11 Thread Andrzej Pietrasiewicz
This patch adds support for afbc handling. afbc is a compressed format which reduces the necessary memory bandwidth. Co-developed-by: Mark Yao Signed-off-by: Mark Yao Signed-off-by: Andrzej Pietrasiewicz --- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + drivers/gpu/drm/rockchip/rockchip

Re: [PATCH 31/33] drm/panel-simple: Fix dotclock for XT VL050-8048NT-C01

2020-03-11 Thread Fabio Estevam
Hi Ville, On Mon, Mar 2, 2020 at 5:36 PM Ville Syrjala wrote: > > From: Ville Syrjälä > > The currently listed dotclock disagrees with the currently > listed vrefresh rate. Change the dotclock to match the vrefresh. > > Someone tell me which (if either) of the dotclock or vreresh is > correct? >

Re: [PATCH 5/6] drm/amdgpu: add support for exporting VRAM using DMA-buf v2

2020-03-11 Thread Alex Deucher
On Wed, Mar 11, 2020 at 9:52 AM Christian König wrote: > > We should be able to do this now after checking all the prerequisites. > > v2: fix entrie count in the sgt > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 56 --- > drivers/gpu/drm/amd/am

Re: [PATCH v2 07/17] drm/etnaviv: remove check for return value of drm_debugfs_create_files()

2020-03-11 Thread Lucas Stach
On Di, 2020-03-10 at 16:31 +0300, Wambui Karuga wrote: > Since commit 987d65d01356 (drm: debugfs: make > drm_debugfs_create_files() never fail), drm_debugfs_create_files() never > fails and only returns 0. Therefore, remove the unnecessary check of its > return value and error handling in etnaviv_d

[tegra-drm:drm/tegra/for-next 1/1] drivers/gpu/drm/tegra/drm.c:858:18: error: initialization of 'int (*)(struct drm_minor *)' from incompatible pointer type 'void (*)(struct drm_minor *)'

2020-03-11 Thread kbuild test robot
tree: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next head: 4e1b4dc4172af081c1feb211ed48b77a008aa054 commit: 4e1b4dc4172af081c1feb211ed48b77a008aa054 [1/1] drm/tegra: Remove checks for debugfs functions return value config: arm64-allmodconfig (attached as .config) compiler: aa

[PATCH 1/2] drm/vmwgfx: Fix the refuse_dma mode when using guest-backed objects

2020-03-11 Thread VMware
From: Thomas Hellstrom When we refuse DMA from system pages for whatever reason, we don't handle that correctly when guest-backed objects was enabled. Since guest-backed objects by definition require DMA to and from system pages, disable all functionality that relies on them. That basically amoun

[PATCH 2/2] drm/vmwgfx: Refuse DMA operation when SEV encryption is active

2020-03-11 Thread VMware
From: Thomas Hellstrom TTM doesn't yet fully support mapping of DMA memory when SEV is active, so in that case, refuse DMA operation. For guest-backed object operation this means 3D acceleration will be disabled. For host-backed, VRAM will be used for data transfer between the guest and the devic

Plumbing explicit synchronization through the Linux ecosystem

2020-03-11 Thread Jason Ekstrand
All, Sorry for casting such a broad net with this one. I'm sure most people who reply will get at least one mailing list rejection. However, this is an issue that affects a LOT of components and that's why it's thorny to begin with. Please pardon the length of this e-mail as well; I promise ther

Re: [RFC PATCH 0/8] *** Per context fencing ***

2020-03-11 Thread Chia-I Wu
On Wed, Mar 11, 2020 at 3:36 AM Gerd Hoffmann wrote: > > Hi, > > > I should've been more clear -- this is an internal cleanup/preparation and > > the per-context changes are invisible to host userspace. > > Ok, it wasn't clear that you don't flip the switch yet. In general the > commit messages

Re: [PATCH 0/5] Cleanup drm_dp_mst_topology_cbs hooks

2020-03-11 Thread Emil Velikov
On Mon, 9 Mar 2020 at 20:27, Lyude Paul wrote: > > On Sat, 2020-03-07 at 14:00 +0530, Pankaj Bharadiya wrote: > > drm_dp_mst_topology_mgr_cbs.register_connector callbacks are identical > > amongst every driver and don't do anything other than calling > > drm_connector_register(). > > drm_dp_mst_to

Re: Plumbing explicit synchronization through the Linux ecosystem

2020-03-11 Thread Jason Ekstrand
On Wed, Mar 11, 2020 at 12:31 PM Jason Ekstrand wrote: > > All, > > Sorry for casting such a broad net with this one. I'm sure most people > who reply will get at least one mailing list rejection. However, this > is an issue that affects a LOT of components and that's why it's > thorny to begin w

Variable Refresh Rate & flickering screens

2020-03-11 Thread Simon Ser
Hi all, I've been working on adding VRR support to Sway [1] (a Wayland compositor). The compositor just sets the VRR_ENABLED property. This works fine for some screens, but causes flcikering for other screens as expected [2]. Fixing the flickering is something we've talked about last XDC [3]. The

Re: [PATCH v6 3/3] drm: bridge: cdns-mhdp: add j721e wrapper

2020-03-11 Thread Laurent Pinchart
Hi Yuti, Thank you for the patch. On Wed, Feb 26, 2020 at 11:22:59AM +0100, Yuti Amonkar wrote: > Add j721e wrapper for mhdp, which sets up the clock and data muxes. > > Signed-off-by: Yuti Amonkar > Signed-off-by: Jyri Sarha > Reviewed-by: Tomi Valkeinen > --- > drivers/gpu/drm/bridge/Kconf

[PATCH] dt-bindings: display: Fix dtc unit-address warnings in examples

2020-03-11 Thread Rob Herring
Extra dtc warnings (roughly what W=1 enables) are now enabled by default when building the binding examples. These were fixed treewide in 5.6-rc5, but some new display bindings have been added with new warnings: Documentation/devicetree/bindings/display/panel/raydium,rm68200.example.dts:17.7-27.11

  1   2   >