[BUG] video: fbdev: sis: possible uninitialized-variable access in SiS_SetCRT2FIFO_300()

2021-07-30 Thread Li Tuo
Hello, Our static analysis tool finds a possible uninitialized-variable access in the sis driver in Linux 5.14.0-rc3: At the beginning of the function SiS_SetCRT2FIFO_300(), the variable modeidindex is not initialized. If the following conditions are false, it remains uninitialized. 5346:   

Re: [PATCH 36/64] scsi: ibmvscsi: Avoid multi-field memset() overflow by aiming at srp

2021-07-30 Thread Tyrel Datwyler
On 7/27/21 6:39 PM, Martin K. Petersen wrote: > > Kees, > >> In preparation for FORTIFY_SOURCE performing compile-time and run-time >> field bounds checking for memset(), avoid intentionally writing across >> neighboring fields. >> >> Instead of writing beyond the end of evt_struct->iu.srp.cmd, t

Re: [PATCH 36/64] scsi: ibmvscsi: Avoid multi-field memset() overflow by aiming at srp

2021-07-30 Thread Tyrel Datwyler
On 7/28/21 8:35 PM, Martin K. Petersen wrote: > > Kees, > >> For example, change it to: >> >> +BUILD_BUG_ON(sizeof(evt_struct->iu.srp) != SRP_MAX_IU_LEN); >> +memset(&evt_struct->iu.srp, 0x00, sizeof(evt_struct->iu.srp)); >> srp_cmd = &evt_struct->iu.srp.cmd; >> -memset(srp_cmd,

[PATCH] DRM: ast: Fixed coding style issues of ast_mode.c

2021-07-30 Thread Gregory Williams
Removed space before comma, fixed if statements by putting trailing statements on new line, fixed unsigned int declaration, and removed not needed else statement after return. Signed-off-by: Gregory Williams --- drivers/gpu/drm/ast/ast_mode.c | 31 --- 1 file change

Re: [PATCH 04/64] stddef: Introduce struct_group() helper macro

2021-07-30 Thread Rasmus Villemoes
On Sat, Jul 31, 2021, 04:59 Kees Cook wrote: > On Fri, Jul 30, 2021 at 10:19:20PM +, Williams, Dan J wrote: > > On Wed, 2021-07-28 at 14:59 -0700, Kees Cook wrote: > > > /** > > * struct_group(NAME, MEMBERS) > > * > > @@ -67,7 +73,10 @@ enum { > > * @NAME: The name of the mirrored sub-

Re: [PATCH 25/64] drm/mga/mga_ioc32: Use struct_group() for memcpy() region

2021-07-30 Thread Kees Cook
On Thu, Jul 29, 2021 at 02:11:27PM +0200, Daniel Vetter wrote: > On Wed, Jul 28, 2021 at 07:56:40AM +0200, Greg Kroah-Hartman wrote: > > On Tue, Jul 27, 2021 at 01:58:16PM -0700, Kees Cook wrote: > > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > > field bounds checkin

Re: [PATCH 04/64] stddef: Introduce struct_group() helper macro

2021-07-30 Thread Kees Cook
On Fri, Jul 30, 2021 at 10:19:20PM +, Williams, Dan J wrote: > On Wed, 2021-07-28 at 14:59 -0700, Kees Cook wrote: > > On Wed, Jul 28, 2021 at 12:54:18PM +0200, Rasmus Villemoes wrote: > > > On 27/07/2021 22.57, Kees Cook wrote: > > > > > > > In order to have a regular programmatic way to desc

[PATCH v2 7/9] drm/sti: Enable COMPILE_TEST on all architectures

2021-07-30 Thread Laurent Pinchart
To extend test coverage, relax the dependency on ARCH_STI or ARCH_MULTIPLATFORM to also enable compilation with COMPILE_TEST. Signed-off-by: Laurent Pinchart --- Changes since v1: - Enable COMPILE_TEST on all architectures --- drivers/gpu/drm/sti/Kconfig | 3 ++- 1 file changed, 2 insertions(+)

[PATCH v2 9/9] drm/tilcdc: Enable COMPILE_TEST on all ARM64 platforms

2021-07-30 Thread Laurent Pinchart
To extend test coverage, support COMPILE_TEST on ARM64 in addition to ARM. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/tilcdc/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/Kconfig b/drivers/gpu/drm/tilcdc/Kconfig index 9f505a149990..

[PATCH v2 8/9] drm/tegra: Enable COMPILE_TEST on all architectures

2021-07-30 Thread Laurent Pinchart
To extend test coverage, support COMPILE_TEST on all architectures. Signed-off-by: Laurent Pinchart --- Changes since v1: - Enable COMPILE_TEST on all architectures --- drivers/gpu/drm/tegra/Kconfig | 2 +- drivers/gpu/host1x/Kconfig| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH v2 6/9] drm/rcar-du: Enable COMPILE_TEST on all architectures

2021-07-30 Thread Laurent Pinchart
To extend test coverage, support COMPILE_TEST on all architectures by dropping the ARM || ARM64 dependency. The dependency is a no-op when COMPILE_TEST is not selected as ARCH_RENESAS can only be defined for ARM or ARM64. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/Kconfig | 1 -

[PATCH v2 5/9] drm/omap: Enable COMPILE_TEST on all architectures

2021-07-30 Thread Laurent Pinchart
To extend test coverage, relax the dependency on ARCH_OMAP2PLUS or ARCH_MULTIPLATFORM to also enable compilation with COMPILE_TEST. Signed-off-by: Laurent Pinchart --- Changes since v1: - Enable COMPILE_TEST on all architectures --- drivers/gpu/drm/omapdrm/Kconfig | 2 +- 1 file changed, 1 inse

[PATCH v2 2/9] drm/omap: Cast pointer to integer without generating warning

2021-07-30 Thread Laurent Pinchart
On 64-bit platforms, the compiler complains that casting a void pointer to an unsigned int loses data. Cast the pointer to a uintptr_t unsigned to fix this. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH v2 3/9] drm/sti: Use correct printk format specifiers for size_t

2021-07-30 Thread Laurent Pinchart
The correct format specifier for size_t is %zu. Using %d (or %u) generates a warning on 64-bit platforms. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Philippe Cornu --- drivers/gpu/drm/sti/sti_hqvdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/d

[PATCH v2 1/9] drm/omap: Use correct printk format specifiers for size_t

2021-07-30 Thread Laurent Pinchart
The correct format specifier for size_t is %zu. Using %d (or %u) generates a warning on 64-bit platforms. Fix it. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/dri

[PATCH v2 4/9] drm/imx/dcss: Enable COMPILE_TEST on all architectures

2021-07-30 Thread Laurent Pinchart
To extend test coverage, relax the dependency on ARCH_MXC and ARM64 to also enable compilation when COMPILE_TEST is selected. Signed-off-by: Laurent Pinchart --- Changes since v1: - Enable COMPILE_TEST on all architectures --- drivers/gpu/drm/imx/dcss/Kconfig | 3 ++- 1 file changed, 2 insertio

[PATCH v2 0/9] drm: Extend COMPILE_TEST support to some ARM drivers

2021-07-30 Thread Laurent Pinchart
Hello, This patch series stems from subsystem-wide changes I wanted to compile-test with an ARM64 cross-compiler. My laziness to fire a 32-bit ARM build definitely resulted in more time being spent writing these patches, but hopefully they'll turn out to be useful for more people. Patches 1/9 to

[PATCH] drm: property: Replace strncpy() with strscpy_pad()

2021-07-30 Thread Laurent Pinchart
strncpy() is widely regarded as unsafe due to the fact that it may leave the destination string without a nul-termination when the source string size is too large. When compiling the kernel with W=1, the gcc warns about this: drivers/gpu/drm/drm_property.c: In function ‘drm_property_create’: drive

Re: [PATCH 4/7] drm/omap: Enable COMPILE_TEST on all ARM and ARM64 platforms

2021-07-30 Thread kernel test robot
Hi Laurent, I love your patch! Perhaps something to improve: [auto build test WARNING on tegra-drm/drm/tegra/for-next] [also build test WARNING on tegra/for-next drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next linus/master v5.14-rc3 next-20210730] [If your patch is applied

Re: [PATCH 0/5] drm/msm/dp: Support multiple DP instances and add sc8180x

2021-07-30 Thread abhinavk
Hi Bjorn On 2021-07-24 21:24, Bjorn Andersson wrote: 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. This

Re: [Intel-gfx] [PATCH] drm/i915/xehp: Fix missing sentinel on mcr_ranges_xehp

2021-07-30 Thread Lucas De Marchi
I guess I forgot to Cc dri-devel. Doing it now. Lucas De Marchi On Fri, Jul 30, 2021 at 12:18:59PM -0700, Matt Roper wrote: On Fri, Jul 30, 2021 at 12:11:15PM -0700, Lucas De Marchi wrote: There's a missing sentinel since we are not using ARRAY_SIZE(), but rather checking that the .start is 0

Re: [PATCH 1/7] drm/omap: Cast pointer to integer safely

2021-07-30 Thread Laurent Pinchart
Hi Tomi, On Thu, Jul 29, 2021 at 09:13:17AM +0300, Tomi Valkeinen wrote: > On 28/07/2021 18:37, Laurent Pinchart wrote: > > On 64-bit platforms, the compiler complains that casting a void pointer > > to an unsigned int loses data. Cast the pointer to a uintptr_t unsigned > > to fix this. > > > >

Re: [Freedreno] [PATCH 1/5] drm/msm/dp: Remove global g_dp_display variable

2021-07-30 Thread abhinavk
On 2021-07-24 21:24, Bjorn Andersson wrote: As the Qualcomm DisplayPort driver only supports a single instance of the driver the commonly used struct dp_display is kept in a global variable. As we introduce additional instances this obviously doesn't work. Replace this with a combination of exis

Re: [PATCH v5 5/6] drm/mediatek: add DSC support for mt8195

2021-07-30 Thread Chun-Kuang Hu
Hi, Jason: jason-jh.lin 於 2021年7月30日 週五 上午1:07寫道: > > Add DSC into mtk_drm_ddp_comp to support for mt8195. > > DSC is designed for real-time systems with real-time compression, > transmission, decompression and display. > The DSC standard is a specification of the algorithms used for > compressin

Re: [PATCH 04/64] stddef: Introduce struct_group() helper macro

2021-07-30 Thread Williams, Dan J
On Wed, 2021-07-28 at 14:59 -0700, Kees Cook wrote: > On Wed, Jul 28, 2021 at 12:54:18PM +0200, Rasmus Villemoes wrote: > > On 27/07/2021 22.57, Kees Cook wrote: > > > > > In order to have a regular programmatic way to describe a struct > > > region that can be used for references and sizing, can

Re: Re: [PATCH 03/14] drm/atmel-hlcdc: Convert to Linux IRQ interfaces

2021-07-30 Thread Dan.Sneddon
On 7/30/21 1:31 AM, Thomas Zimmermann wrote: > Hi Dan and Sam > > Am 29.07.21 um 21:55 schrieb dan.sned...@microchip.com: >> Hi Thomas and Sam, >> On 7/29/21 12:48 PM, Sam Ravnborg wrote: >>> EXTERNAL EMAIL: Do not click links or open attachments unless you >>> know the content is safe >>> >>> Hi

[PATCH v2 5/6] drm/panel-simple: Split the delay structure out of the panel description

2021-07-30 Thread Douglas Anderson
In the case where we can read an EDID for a panel the only part of the panel description that can't be found directly from the EDID is the description of the delays. Let's break the delay structure out so that we can specify just the delays for panels that are detected by EDID. This is simple code

[PATCH v2 6/6] drm/panel-simple: Implement generic "edp-panel"s probed by EDID

2021-07-30 Thread Douglas Anderson
As discussed in the patch ("dt-bindings: drm/panel-simple: Introduce generic eDP panels") we can actually support probing eDP panels at runtime instead of hardcoding what panel is connected. Add support to the panel-simple driver for this. We'll implement a solution like this: * We'll read in two

[PATCH v2 2/6] drm/edid: Break out reading block 0 of the EDID

2021-07-30 Thread Douglas Anderson
A future change wants to be able to read just block 0 of the EDID, so break it out of drm_do_get_edid() into a sub-function. This is intended to be a no-op change--just code movement. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/drm_edid.c | 62 +++

[PATCH v2 3/6] drm/edid: Allow the querying/working with the panel ID from the EDID

2021-07-30 Thread Douglas Anderson
EDIDs have 32-bits worth of data which is intended to be used to uniquely identify the make/model of a panel. This has historically been used only internally in the EDID processing code to identify quirks with panels. We'd like to use this panel ID in panel-simple to identify which panel is hooked

[PATCH v2 4/6] drm/panel-simple: Don't re-read the EDID every time we power off the panel

2021-07-30 Thread Douglas Anderson
The simple-panel driver is for panels that are not hot-pluggable at runtime. Let's keep our cached EDID around until driver unload. Signed-off-by: Douglas Anderson --- (no changes since v1) drivers/gpu/drm/panel/panel-simple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -

[PATCH v2 1/6] dt-bindings: drm/panel-simple: Introduce generic eDP panels

2021-07-30 Thread Douglas Anderson
eDP panels generally contain almost everything needed to control them in their EDID. This comes from their DP heritage were a computer needs to be able to properly control pretty much any DP display that's plugged into it. The one big issue with eDP panels and the reason that we need a panel drive

[PATCH v2 0/6] eDP: Support probing eDP panels dynamically instead of hardcoding

2021-07-30 Thread Douglas Anderson
The goal of this patch series is to move away from hardcoding exact eDP panels in device tree files. As discussed in the various patches in this series (I'm not repeating everything here), most eDP panels are 99% probable and we can get that last 1% by allowing two "power up" delays to be specified

Re: [PATCH 3/3] dma-buf: nuke SW_SYNC debugfs files

2021-07-30 Thread Hridya Valsaraju
On Thu, Jul 29, 2021 at 9:52 PM John Stultz wrote: > > On Thu, Jul 29, 2021 at 12:24 AM Daniel Vetter wrote: > > > > On Thu, Jul 29, 2021 at 09:03:30AM +0200, Christian König wrote: > > > As we now knew controlling dma_fence synchronization from userspace is > > > extremely dangerous and can not

[RFC PATCH v3 2/6] drm/color: Add transfer functions for HDR/SDR on drm_plane

2021-07-30 Thread Harry Wentland
From: Bhawanpreet Lakha Due to the way displays and human vision work it is most effective to encode luminance information in a non-linear space. For SDR this non-linear mapping is assumed to roughly use a gamma 2.2 curve. This was due to the way CRTs worked and was fine for SDR content with a l

[RFC PATCH v3 4/6] drm/color: Add sdr boost property

2021-07-30 Thread Harry Wentland
From: Bhawanpreet Lakha SDR is typically mastered at 200 nits and HDR is mastered at up to 10,000 nits. Due to this luminance range difference if we blend a SDR and HDR plane together, we can run into problems where the HDR plane is too bright or the SDR plane is too dim A common solution to thi

[RFC PATCH v3 6/6] drm/amd/display: reformat YCbCr-RGB conversion matrix

2021-07-30 Thread Harry Wentland
Show the CSC matrixes in a 4x3 format. Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h | 28 + 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dp

[RFC PATCH v3 5/6] drm/color: Add color space plane property

2021-07-30 Thread Harry Wentland
From: Bhawanpreet Lakha Add color space definitions for BT601, BT709, BT2020, and DCI-P3. Default to BT709, the sRGB color space. Signed-off-by: Bhawanpreet Lakha Signed-off-by: Harry Wentland --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 + .../gpu/drm/arm/display/komeda/komeda_pla

[RFC PATCH v3 3/6] drm/color: Add output transfer function to crtc

2021-07-30 Thread Harry Wentland
We currently have 1D LUTs to define output transfer function but using a 1D LUT is not always the best way to define a transfer function for HW that has ROMs for certain transfer functions, or for HW that has complex PWL definition for accurate LUT definitions. For this reason we're introducing na

[RFC PATCH v3 1/6] drm/doc: Color Management and HDR10 RFC

2021-07-30 Thread Harry Wentland
Use the new DRM RFC doc section to capture the RFC previously only described in the cover letter at https://patchwork.freedesktop.org/series/89506/ v3: * Add sections on single-plane and multi-plane HDR * Describe approach to define HW details vs approach to define SW intentions * Link Jeremy C

[RFC PATCH v3 0/6] A drm_plane API to support HDR planes

2021-07-30 Thread Harry Wentland
We are looking to enable HDR support for a couple of single-plane and multi-plane scenarios. To do this effectively we recommend new interfaces to drm_plane. The first patch gives a bit of background on HDR and why we propose these interfaces. This update is only changing the documentation, not th

[PATCH 14/14] drm/i915/guc/rc: Setup and enable GuCRC feature

2021-07-30 Thread Vinay Belgaumkar
This feature hands over the control of HW RC6 to the GuC. GuC decides when to put HW into RC6 based on it's internal busyness algorithms. GuCRC needs GuC submission to be enabled, and only supported on Gen12+ for now. When GuCRC is enabled, do not set HW RC6. Use a H2G message to tell GuC to enab

[PATCH 13/14] drm/i915/guc/slpc: Add SLPC selftest

2021-07-30 Thread Vinay Belgaumkar
Tests that exercise the SLPC get/set frequency interfaces. Clamp_max will set max frequency to multiple levels and check that SLPC requests frequency lower than or equal to it. Clamp_min will set min frequency to different levels and check if SLPC requests are higher or equal to those levels. v2

[PATCH 12/14] drm/i915/guc/slpc: Sysfs hooks for SLPC

2021-07-30 Thread Vinay Belgaumkar
Update the get/set min/max freq hooks to work for SLPC case as well. Consolidate helpers for requested/min/max frequency get/set to intel_rps where the proper action can be taken depending on whether SLPC is enabled. v2: Add wrappers for getting rp0/1/n frequencies, update softlimits in set min/ma

[PATCH 11/14] drm/i915/guc/slpc: Cache platform frequency limits

2021-07-30 Thread Vinay Belgaumkar
Cache rp0, rp1 and rpn platform limits into SLPC structure for range checking while setting min/max frequencies. Also add "soft" limits which keep track of frequency changes made from userland. These are initially set to platform min and max. v2: Address review comments (Michal W) v3: Formatting

[PATCH 08/14] drm/i915/guc/slpc: Add get max/min freq hooks

2021-07-30 Thread Vinay Belgaumkar
Add helpers to read the min/max frequency being used by SLPC. This is done by send a H2G command which forces SLPC to update the shared data struct which can then be read. These helpers will be used in a sysfs patch later on. v2: Address review comments (Michal W) v3: Return err in case of query f

[PATCH 10/14] drm/i915/guc/slpc: Enable ARAT timer interrupt

2021-07-30 Thread Vinay Belgaumkar
This interrupt is enabled during RPS initialization, and now needs to be done by SLPC code. It allows ARAT timer expiry interrupts to get forwarded to GuC. v2: Fix comment (Matthew Brost) v3: checkpatch() Reviewed-by: Matthew Brost Signed-off-by: Vinay Belgaumkar --- drivers/gpu/drm/i915/gt/uc

[PATCH 07/14] drm/i915/guc/slpc: Add methods to set min/max frequency

2021-07-30 Thread Vinay Belgaumkar
Add param set h2g helpers to set the min and max frequencies for use by SLPC. v2: Address review comments (Michal W) v3: Check for positive error code (Michal W) v4: Print generic error in set_param (Michal W) Reviewed-by: Michal Wajdeczko Signed-off-by: Sundaresan Sujaritha Signed-off-by: Vina

[PATCH 09/14] drm/i915/guc/slpc: Add debugfs for SLPC info

2021-07-30 Thread Vinay Belgaumkar
This prints out relevant SLPC info from the SLPC shared structure. We will send a H2G message which forces SLPC to update the shared data structure with latest information before reading it. v2: Address review comments (Michal W) v3: Remove unnecessary tasks from slpc_info (Michal W) v4: Rename f

[PATCH 04/14] drm/i915/guc/slpc: Allocate, initialize and release SLPC

2021-07-30 Thread Vinay Belgaumkar
Allocate data structures for SLPC and functions for initializing on host side. v2: Address review comments (Michal W) v3: Remove unnecessary header includes (Michal W) v4: Rebase v5: Move allocation of shared data into slpc_init() (Michal W) Reviewed-by: Michal Wajdeczko Signed-off-by: Vinay Bel

[PATCH 06/14] drm/i915/guc/slpc: Remove BUG_ON in guc_submission_disable

2021-07-30 Thread Vinay Belgaumkar
The assumption when it was added was that GT would not be holding any gt_pm references. However, uc_init is called from gt_init_hw, which holds a forcewake ref. If SLPC enable fails, we will still be holding this ref, which will result in the BUG_ON. Reviewed-by: Matthew Brost Signed-off-by: Vina

[PATCH 05/14] drm/i915/guc/slpc: Enable SLPC and add related H2G events

2021-07-30 Thread Vinay Belgaumkar
Add methods for interacting with GuC for enabling SLPC. Enable SLPC after GuC submission has been established. GuC load will fail if SLPC cannot be successfully initialized. Add various helper methods to set/unset the parameters for SLPC. They can be set using H2G calls or directly setting bits in

[PATCH 03/14] drm/i915/guc/slpc: Adding SLPC communication interfaces

2021-07-30 Thread Vinay Belgaumkar
Add constants and params that are needed to configure SLPC. v2: Add a new abi header for SLPC. Replace bitfields with genmasks. Address other comments from Michal W. v3: Add slpc H2G format in abi, other review commments (Michal W) v4: Update status bits according to latest spec v5: checkpatch(

[PATCH 02/14] drm/i915/guc/slpc: Gate Host RPS when SLPC is enabled

2021-07-30 Thread Vinay Belgaumkar
Also ensure uc_init is called before we initialize RPS so that we can check for SLPC support. We do not need to enable up/down interrupts when SLPC is enabled. However, we still need the ARAT interrupt, which will be enabled separately later. v2: Explicitly return from intel_rps_enable with slpc c

[PATCH 01/14] drm/i915/guc/slpc: Initial definitions for SLPC

2021-07-30 Thread Vinay Belgaumkar
Add macros to check for SLPC support. This feature is currently supported for Gen12+ and enabled whenever GuC submission is enabled/selected. Include templates for SLPC init/fini and enable. v2: Move SLPC helper functions to intel_guc_slpc.c/.h. Define basic template for SLPC structure in intel_g

[PATCH v6 00/14] drm/i915/guc/slpc: Enable GuC based power management features

2021-07-30 Thread Vinay Belgaumkar
This series enables Single Loop Power Control (SLPC) feature in GuC. GuC implements various power management algorithms as part of it's operation. These need to be specifically enabled by KMD. They replace the legacy host based management of these features. With this series, we will enable two PM

Re: [Intel-gfx] [PATCH 13/14] drm/i915/guc/slpc: Add SLPC selftest

2021-07-30 Thread Matthew Brost
On Thu, Jul 29, 2021 at 07:01:06PM -0700, Vinay Belgaumkar wrote: > Tests that exercise the SLPC get/set frequency interfaces. > > Clamp_max will set max frequency to multiple levels and check > that SLPC requests frequency lower than or equal to it. > > Clamp_min will set min frequency to differ

[PATCH] drm/i915: Fix syncmap memory leak

2021-07-30 Thread Matthew Brost
A small race exists between intel_gt_retire_requests_timeout and intel_timeline_exit which could result in the syncmap not getting free'd. Rather than work to hard to seal this race, simply cleanup the syncmap on fini. unreferenced object 0x88813bc53b18 (size 96): comm "gem_close_race", pid

Re: [PATCH 0/7] drm: Extend COMPILE_TEST support to some ARM drivers

2021-07-30 Thread Laurent Pinchart
Hi Sam, On Thu, Jul 29, 2021 at 06:53:33PM +0200, Sam Ravnborg wrote: > On Wed, Jul 28, 2021 at 06:37:29PM +0300, Laurent Pinchart wrote: > > Hello, > > > > This patch series stems from subsystem-wide changes I wanted to > > compile-test with an ARM64 cross-compiler. My laziness to fire a 32-bit

Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-30 Thread Kees Cook
On Fri, Jul 30, 2021 at 10:08:03AM -0700, Nick Desaulniers wrote: > On Fri, Jul 30, 2021 at 9:44 AM Kees Cook wrote: > > > > On Fri, Jul 30, 2021 at 12:00:54PM +0300, Dan Carpenter wrote: > > > On Fri, Jul 30, 2021 at 10:38:45AM +0200, David Sterba wrote: > > > > Then is explicit memset the only r

Re: [PATCH v4 10/13] lib: test_hmm add module param for zone device type

2021-07-30 Thread Felix Kuehling
Am 2021-07-28 um 7:45 p.m. schrieb Sierra Guiza, Alejandro (Alex): > > On 7/22/2021 12:26 PM, Jason Gunthorpe wrote: >> On Thu, Jul 22, 2021 at 11:59:17AM -0500, Sierra Guiza, Alejandro >> (Alex) wrote: >>> On 7/22/2021 7:23 AM, Jason Gunthorpe wrote: On Sat, Jul 17, 2021 at 02:21:32PM -0500,

Re: [PATCH v3 0/8] Support DEVICE_GENERIC memory in migrate_vma_*

2021-07-30 Thread Felix Kuehling
Am 2021-07-23 um 6:46 p.m. schrieb Sierra Guiza, Alejandro (Alex): > > On 7/17/2021 2:54 PM, Sierra Guiza, Alejandro (Alex) wrote: >> >> On 7/16/2021 5:14 PM, Felix Kuehling wrote: >>> Am 2021-07-16 um 11:07 a.m. schrieb Theodore Y. Ts'o: On Wed, Jun 23, 2021 at 05:49:55PM -0400, Felix Kuehlin

Re: [PATCH] drm/msm/dp: update is_connected status base on sink count at dp_pm_resume()

2021-07-30 Thread Stephen Boyd
Quoting Kuogee Hsieh (2021-07-28 14:30:54) > Currently at dp_pm_resume() is_connected state is decided base on hpd > connection > status only. This will put is_connected in wrongly "true" state at the > scenario > that dongle attached to DUT but without hmdi cable connecting to it. Fix this > pro

[PATCH v3 4/5] drm/gud: Map framebuffer BOs with drm_gem_fb_vmap()

2021-07-30 Thread Thomas Zimmermann
Abstract the framebuffer details by mapping its BOs with a call to drm_gem_fb_vmap(). Unmap with drm_gem_fb_vunmap(). The call to drm_gem_fb_vmap() ensures that all BOs are mapped correctly. Gud still only supports single-plane formats. No functional changes. Signed-off-by: Thomas Zimmermann Ac

[PATCH v3 2/5] drm/gem: Provide drm_gem_fb_{vmap,vunmap}()

2021-07-30 Thread Thomas Zimmermann
Move framebuffer vmap code from shadow-buffered plane state into the new interfaces drm_gem_fb_vmap() and drm_gem_fb_vunmap(). These functions provide mappings of a framebuffer's BOs into kernel address space. No functional changes. v2: * using [static N] for array parameters enables compi

[PATCH v3 5/5] drm/vkms: Map output framebuffer BOs with drm_gem_fb_vmap()

2021-07-30 Thread Thomas Zimmermann
Abstract the framebuffer details by mappings its BOs with a call to drm_gem_fb_vmap(). Unmap with drm_gem_fb_vunamp(). Before, the output address with stored as raw pointer in the priv field of struct drm_writeback_job. Introduce the new type struct vkms_writeback_job, which holds the output mappi

[PATCH v3 3/5] drm/gem: Clear mapping addresses for unused framebuffer planes

2021-07-30 Thread Thomas Zimmermann
Set the returned mapping address to NULL if a framebuffer plane does not have a BO associated with it. Likewise, ignore mappings of NULL during framebuffer unmap operations. Allows users of the functions to perform unmap operations of certain BOs by themselfes. Signed-off-by: Thomas Zimmermann Re

[PATCH v3 1/5] drm: Define DRM_FORMAT_MAX_PLANES

2021-07-30 Thread Thomas Zimmermann
DRM uses a magic number of 4 for the maximum number of planes per color format. Declare this constant via DRM_FORMAT_MAX_PLANES and update the related code. Some code depends on the length of arrays that are now declared with DRM_FORMAT_MAX_PLANES. Convert it from '4' to ARRAY_SIZE. v2: *

[PATCH v3 0/5] drm: Provide framebuffer vmap helpers

2021-07-30 Thread Thomas Zimmermann
Add the new helpers drm_gem_fb_vmap() and drm_gem_fb_vunmap(), which provide vmap/vunmap for all BOs of a framebuffer. Convert shadow- plane helpers, gud and vkms. Callers of GEM vmap and vunmap functions used to do the minimum work or get some detail wrong. Therefore shadow-plane helpers were int

Re: [Intel-gfx] [PATCH 1/1] drm/i915: Check if engine has heartbeat when closing a context

2021-07-30 Thread Matthew Brost
On Fri, Jul 30, 2021 at 10:49:01AM +0100, Tvrtko Ursulin wrote: > > On 30/07/2021 01:13, John Harrison wrote: > > On 7/28/2021 17:34, Matthew Brost wrote: > > > If an engine associated with a context does not have a heartbeat, ban it > > > immediately. This is needed for GuC submission as a idle p

Re: [Intel-gfx] [PATCH 1/1] drm/i915: Check if engine has heartbeat when closing a context

2021-07-30 Thread John Harrison
On 7/30/2021 02:49, Tvrtko Ursulin wrote: On 30/07/2021 01:13, John Harrison wrote: On 7/28/2021 17:34, Matthew Brost wrote: If an engine associated with a context does not have a heartbeat, ban it immediately. This is needed for GuC submission as a idle pulse doesn't kick the context off the

Re: [PATCH 0/2] locking/lockdep, drm: apply new lockdep assert in drm_auth.c

2021-07-30 Thread Waiman Long
On 7/30/21 12:15 AM, Desmond Cheong Zhi Xi wrote: Hi, Following a discussion on the patch ("drm: use the lookup lock in drm_is_current_master") [1], Peter Zijlstra proposed new lockdep_assert helpers to make it convenient to compose lockdep checks together. This series includes the patch that i

Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-30 Thread Nick Desaulniers
On Fri, Jul 30, 2021 at 9:44 AM Kees Cook wrote: > > On Fri, Jul 30, 2021 at 12:00:54PM +0300, Dan Carpenter wrote: > > On Fri, Jul 30, 2021 at 10:38:45AM +0200, David Sterba wrote: > > > Then is explicit memset the only reliable way accross all compiler > > > flavors and supported versions? > > >

Re: [PATCH 01/64] media: omap3isp: Extract struct group for memcpy() region

2021-07-30 Thread Kees Cook
On Fri, Jul 30, 2021 at 12:00:54PM +0300, Dan Carpenter wrote: > On Fri, Jul 30, 2021 at 10:38:45AM +0200, David Sterba wrote: > > Then is explicit memset the only reliable way accross all compiler > > flavors and supported versions? > > > > The = { } initializer works. It's only when you start

Re: [PATCH 9/9] phy: phy-mtk-mipi-dsi: convert to devm_platform_ioremap_resource

2021-07-30 Thread Chun-Kuang Hu
Hi, Chunfeng: Chunfeng Yun 於 2021年7月28日 週三 下午3:59寫道: > > Use devm_platform_ioremap_resource to simplify code Acked-by: Chun-Kuang Hu > > Signed-off-by: Chunfeng Yun > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a

Re: [PATCH 8/9] phy: phy-mtk-mipi-dsi: remove dummy assignment of error number

2021-07-30 Thread Chun-Kuang Hu
Hi, Chunfeng: Chunfeng Yun 於 2021年7月28日 週三 下午3:59寫道: > > Return the error number directly without assignment Acked-by: Chun-Kuang Hu > > Signed-off-by: Chunfeng Yun > --- > drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/

Re: [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource

2021-07-30 Thread Chun-Kuang Hu
Hi, Chunfeng: Chunfeng Yun 於 2021年7月28日 週三 下午3:59寫道: > > Use devm_platform_ioremap_resource to simplify code Acked-by: Chun-Kuang Hu > > Signed-off-by: Chunfeng Yun > --- > drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/dri

[PATCH v2 5/6] Revert "drm/panel-simple: Support for delays between GPIO & regulator"

2021-07-30 Thread Douglas Anderson
This reverts commit 18a1488bf1e13fc3fc96d7948466b2166067c6c8. Those delays were added to support the Samsung ATNA33XC20 panel. However, we've moving that to its own panel driver and out of panel-simple. That means we don't need the ability to specify this delay. NOTE: it's unlikely we want to kee

[PATCH v2 4/6] Revert "drm/panel-simple: Add Samsung ATNA33XC20"

2021-07-30 Thread Douglas Anderson
This reverts commit 4bfe6c8f7c23b01719671b69fd29b87a35ccd9d6. This panel's power sequencing really can't be handled properly by panel-simple because of the special sequencing needed for the EL_ON3 GPIO. The only way it was sorta working in the past was by trying to jam that signal into the "enable

[PATCH v2 6/6] drm/panel: atna33xc20: Introduce the Samsung ATNA33XC20 panel

2021-07-30 Thread Douglas Anderson
The Samsung ATNA33XC20 panel is an AMOLED eDP panel that has backlight control over the DP AUX channel. This panel is _almost_ able to be controlled in a "simple" way (and it originally was implemented in panel-simple.c), but it's really impossible to get the backlight semantics right there withou

[PATCH v2 3/6] drm/bridge: ti-sn65dsi86: Add some 100 us delays

2021-07-30 Thread Douglas Anderson
The manual has always said that we need 100 us delays in a few places. Though it hasn't seemed to be a big deal to skip these, let's add them in case it makes something happier. NOTE: this fixes no known issues but it seems good to make it right. Fixes: a095f15c00e2 ("drm/bridge: add support for

[PATCH v2 1/6] drm/dp: Don't zero PWMGEN_BIT_COUNT when driver_pwm_freq_hz not specified

2021-07-30 Thread Douglas Anderson
The function drm_edp_backlight_init() is defined such that the "driver_pwm_freq_hz" parameter is optional--it's 0 if you don't want to futz with it. If you follow this variable through, you'll find out that if it's 0 we won't ever set the "bl->pwmgen_bit_count", leaving it as 0. That means that be

[PATCH v2 2/6] drm/bridge: ti-sn65dsi86: Fix power off sequence

2021-07-30 Thread Douglas Anderson
When testing with a panel that's apparently a little more persnickety about the correct power sequence (specifically Samsung ATNA33XC20), we found that the ti-sn65dsi86 was doing things just slightly wrong. Looking closely at the ti-sn65dsi86's datasheet, the power off sequence is supposed to be:

[PATCH v2 0/6] drm/panel: atna33xc20: Fix the Samsung ATNA33XC20 panel

2021-07-30 Thread Douglas Anderson
The overall goal of this series is to make the Samsung ATNA33XC20 panel work more properly. As part of this, we have: * A bugfix for the recently abstracted DP AUX backlight code. * A bugfix for the sequencing of the ti-sn65dsi86 bridge driver. * Removal of the panel from panel-simple and moving

Re: [PATCH v8 00/14] drm/tegra: Introduce a modern UABI

2021-07-30 Thread Dmitry Osipenko
09.07.2021 22:31, Thierry Reding пишет: > From: Thierry Reding > > Hi all, > > Mikko has been away for a few weeks, so I've been testing and revising > the new UABI patches in the meantime. There are very minor changes to > the naming of some of the UABI fields, but other than that it's mostly >

Re: [PATCH -next] drm/amdgpu: fix checking pmops when PM_SLEEP is not enabled

2021-07-30 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Jul 29, 2021 at 11:03 PM Randy Dunlap wrote: > > 'pm_suspend_target_state' is only available when CONFIG_PM_SLEEP > is set/enabled. OTOH, when both SUSPEND and HIBERNATION are not set, > PM_SLEEP is not set, so this variable cannot be used. > > ../drivers/gpu/drm/a

Re: [PATCH] drm: Fix oops in damage self-tests by mocking damage property

2021-07-30 Thread kernel test robot
e-property/20210730-175415 base: git://anongit.freedesktop.org/drm/drm-tip drm-tip config: i386-randconfig-s001-20210730 (attached as .config) compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-341-g8af2

[RFC PATCH] drm: mock_device can be static

2021-07-30 Thread kernel test robot
drivers/gpu/drm/selftests/test-drm_damage_helper.c:15:19: warning: symbol 'mock_device' was not declared. Should it be static? drivers/gpu/drm/selftests/test-drm_damage_helper.c:16:30: warning: symbol 'mock_obj_props' was not declared. Should it be static? drivers/gpu/drm/selftests/test-drm_damag

[ANNOUNCE] xf86-video-amdgpu 21.0.0

2021-07-30 Thread Alex Deucher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Adam Jackson (2): kms: Handle changes to SourceValidate call chain in xserver 19 Fix link failure with gcc 10 Alex Deucher (1): Bump version for the 21.0.0 release Emil Velikov (10): Use ODEV_ATTRIB_PATH where possible for the

Re: [RFC v1 0/4] drm: Add support for DRM_CAP_DEFERRED_OUT_FENCE capability

2021-07-30 Thread Gerd Hoffmann
Hi, > - We fix virtio to send out the completion event at the end of this entire > pipeline, i.e. virtio code needs to take care of sending out the > crtc_state->event correctly. That sounds sensible to me. Fence the virtio commands, make sure (on the host side) the command completes only

[PATCH v2] drm: Fix typo in comments

2021-07-30 Thread Cai Huoqing
fix typo for drm v1->v2: respin with the change "iff ==> implies that" Reviewed-by: Daniel Vetter Signed-off-by: Cai Huoqing --- drivers/gpu/drm/drm_aperture.c | 2 +- drivers/gpu/drm/drm_atomic.c| 2 +- drivers/gpu/drm/drm_atomic_helper.c | 10 +- drivers/gp

Re: [RFC v1 0/4] drm: Add support for DRM_CAP_DEFERRED_OUT_FENCE capability

2021-07-30 Thread Michel Dänzer
On 2021-07-30 12:25 p.m., Daniel Vetter wrote: > On Thu, Jul 29, 2021 at 01:16:55AM -0700, Vivek Kasireddy wrote: >> By separating the OUT_FENCE signalling from pageflip completion allows >> a Guest compositor to start a new repaint cycle with a new buffer >> instead of waiting for the old buffer t

Re: [PATCH 3/7] drm/imx/dcss: Enable COMPILE_TEST on all ARM64 platforms

2021-07-30 Thread Philipp Zabel
On Fri, 2021-07-30 at 14:10 +0200, Geert Uytterhoeven wrote: > Hi Laurent, > > On Wed, Jul 28, 2021 at 5:37 PM Laurent Pinchart > wrote: > > To extend test coverage, relax the dependency on ARCH_MXC to also enable > > compilation when COMPILE_TEST is selected. > > > > Signed-off-by: Laurent Pinc

[PATCH v5] drm/panel: Add support for E Ink VB3300-KCA

2021-07-30 Thread Alistair Francis
Add support for the 10.3" E Ink panel described at: https://www.eink.com/product.html?type=productdetail&id=7 Signed-off-by: Alistair Francis Acked-by: Rob Herring Reviewed-by: Sam Ravnborg --- v5: - Add .connector_type .../bindings/display/panel/panel-simple.yaml | 2 ++ .../devicetree/bi

Re: [PATCH 3/7] drm/imx/dcss: Enable COMPILE_TEST on all ARM64 platforms

2021-07-30 Thread Geert Uytterhoeven
Hi Laurent, On Wed, Jul 28, 2021 at 5:37 PM Laurent Pinchart wrote: > To extend test coverage, relax the dependency on ARCH_MXC to also enable > compilation when COMPILE_TEST is selected. > > Signed-off-by: Laurent Pinchart Thanks for your patch! > --- a/drivers/gpu/drm/imx/dcss/Kconfig > +++

Aw: [PATCH v7 00/12] Clean up "mediatek,larb"

2021-07-30 Thread Frank Wunderlich
Full Series tested on BPI-R2/MT7623 Tested-By: Frank Wunderlich regards Frank

Re: [PATCH v5 0/6] Add Mediatek Soc DRM (vdosys0) support for mt8195

2021-07-30 Thread Enric Balletbo i Serra
Hi Jason, Thank you for your patch. On 29/7/21 19:07, jason-jh.lin wrote: > The hardware path of vdosys0 with eDP panel output need to go through > by several modules, such as, OVL, RDMA, COLOR, CCORR, AAL, GAMMA, > DITHER, DSC and MERGE. > You said in other discussions that vdosys0 has eDP pa

Re: [PATCH v5 2/6] soc: mediatek: add mtk-mmsys support for mt8195 vdosys0

2021-07-30 Thread Enric Balletbo i Serra
Hi Jason, Thank you for your patch. On 29/7/21 19:07, jason-jh.lin wrote: > Add mt8195 vdosys0 clock driver name and routing table to > the driver data of mtk-mmsys. > This patch is the one that is really introducing mt8195 mmsys support. It is a bit confusing sent the binding on another patchs

Re: [PATCH 48/64] drbd: Use struct_group() to zero algs

2021-07-30 Thread Lars Ellenberg
On Thu, Jul 29, 2021 at 07:57:47PM -0700, Bart Van Assche wrote: > On 7/29/21 7:31 PM, Kees Cook wrote: > > On Wed, Jul 28, 2021 at 02:45:55PM -0700, Bart Van Assche wrote: > >> On 7/27/21 1:58 PM, Kees Cook wrote: > >>> In preparation for FORTIFY_SOURCE performing compile-time and run-time > >>> f

[PATCH] drm/vc4: hdmi: make vc4_hdmi_codec_pdata static

2021-07-30 Thread Jiapeng Chong
This symbol is not used outside of vc4_hdmi.c, so marks it static. Fix the following sparse warning: drivers/gpu/drm/vc4/vc4_hdmi.c:1479:25: warning: symbol 'vc4_hdmi_codec_pdata' was not declared. Should it be static? Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/

  1   2   >