[PATCH 2/2] drm/nouveau/debugfs: fix file release memory leak

2021-09-11 Thread Yang Yingliang
When using single_open() for opening, single_release() should be called, otherwise the 'op' allocated in single_open() will be leaked. Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- dri

[PATCH 1/2] drm/nouveau/kms/nv50-: fix file release memory leak

2021-09-11 Thread Yang Yingliang
When using single_open() for opening, single_release() should be called, otherwise the 'op' allocated in single_open() will be leaked. Fixes: 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/gpu/drm/nouveau/dispnv50/crc.c

Re: [PATCH V4 00/10] PCI/VGA: Rework default VGA device selection

2021-09-11 Thread Huacai Chen
Hi, Bjorn, On Fri, Sep 10, 2021 at 1:59 AM Bjorn Helgaas wrote: > > On Fri, Aug 27, 2021 at 04:31:19PM +0800, Huacai Chen wrote: > > My original work is at [1]. > > > > Bjorn do some rework and extension in V2. It moves the VGA arbiter to > > the PCI subsystem, fixes a few nits, and breaks a few

[PATCH V5 00/11] PCI/VGA: Rework default VGA device selection

2021-09-11 Thread Huacai Chen
My original work is at [1]. Current default VGA device selection fails in some cases: - On BMC system, the AST2500 bridge [1a03:1150] does not implement PCI_BRIDGE_CTL_VGA [1]. This is perfectly legal but means the legacy VGA resources won't reach downstream devices unless they're

[PATCH V5 01/11] PCI/VGA: Move vgaarb to drivers/pci

2021-09-11 Thread Huacai Chen
From: Bjorn Helgaas The VGA arbiter is really PCI-specific and doesn't depend on any GPU things. Move it to the PCI subsystem. Signed-off-by: Bjorn Helgaas --- drivers/gpu/vga/Kconfig | 19 --- drivers/gpu/vga/Makefile | 1 - drivers/pci/Kconfig

[PATCH V5 02/11] PCI/VGA: Prefer vga_default_device()

2021-09-11 Thread Huacai Chen
Use the vga_default_device() interface consistently instead of directly testing vga_default. No functional change intended. [bhelgaas: split to separate patch and extended] Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas --- drivers/pci/vgaarb.c | 6 +++--- 1 file changed, 3 insertions

[PATCH V5 03/11] PCI/VGA: Move vga_arb_integrated_gpu() earlier in file

2021-09-11 Thread Huacai Chen
Move vga_arb_integrated_gpu() earlier in file to prepare for future patch. No functional change intended. Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas --- drivers/pci/vgaarb.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/p

[PATCH V5 04/11] PCI/VGA: Split out vga_arb_update_default_device()

2021-09-11 Thread Huacai Chen
This patch is the first step of the rework: If there's no default VGA device, and we find a VGA device that owns the legacy VGA resources, we make that device the default. Split this logic out from vga_arbiter_add_ pci_device() into a new function, vga_arb_update_default_device(). Signed-off-by: H

[PATCH V5 05/11] PCI/VGA: Update default VGA device if a better one found

2021-09-11 Thread Huacai Chen
This patch is the second step of the rework: Update default VGA device if a better one is found. What is a better one? A device with legacy I/O resources enabled is better those not enabled. And the integrated GPU is better than others. Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas ---

[PATCH V5 06/11] PCI/VGA: Update default VGA device again for X86/IA64

2021-09-11 Thread Huacai Chen
This patch is the third step of the rework: On X86 and IA64 platform, update default VGA device if the new found device owns the firmware framebuffer. Signed-off-by: Huacai Chen --- drivers/pci/vgaarb.c | 45 1 file changed, 45 insertions(+) diff --g

[PATCH V5 07/11] PCI/VGA: Remove vga_arb_select_default_device()

2021-09-11 Thread Huacai Chen
This patch is the last step of the rework: Since vga_arb_update_default_ device() is complete, we can remove vga_arb_select_default_device() and its call-site. Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas --- drivers/pci/vgaarb.c | 89 1 f

[PATCH V5 08/11] PCI/VGA: Remove empty vga_arb_device_card_gone()

2021-09-11 Thread Huacai Chen
From: Bjorn Helgaas vga_arb_device_card_gone() has always been empty. Remove it. Signed-off-by: Bjorn Helgaas --- drivers/pci/vgaarb.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c index 5a008d190ed8..1a829cbac

[PATCH V5 09/11] PCI/VGA: Log bridge control messages when adding devices

2021-09-11 Thread Huacai Chen
Previously vga_arb_device_init() iterated through all VGA devices and indicated whether legacy VGA routing to each could be controlled by an upstream bridge. But we determine that information in vga_arbiter_add_pci_device(), which we call for every device, so we can log it there without iterating

[PATCH V5 10/11] PCI/VGA: Use unsigned format string to print lock counts

2021-09-11 Thread Huacai Chen
From: Bjorn Helgaas In struct vga_device, io_lock_cnt and mem_lock_cnt are unsigned, but we previously printed them with "%d", the signed decimal format. Print them with the unsigned format "%u" instead. Signed-off-by: Bjorn Helgaas --- drivers/pci/vgaarb.c | 2 +- 1 file changed, 1 insertion

[PATCH V5 11/11] PCI/VGA: Replace full MIT license text with SPDX identifier

2021-09-11 Thread Huacai Chen
From: Bjorn Helgaas Per Documentation/process/license-rules.rst, the SPDX MIT identifier is equivalent to including the entire MIT license text from LICENSES/preferred/MIT. Replace the MIT license text with the equivalent SPDX identifier. Signed-off-by: Bjorn Helgaas --- drivers/pci/vgaarb.c

Re: [PATCH v3 3/8] x86/sev: Add an x86 version of cc_platform_has()

2021-09-11 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:34PM -0500, Tom Lendacky wrote: > diff --git a/arch/x86/kernel/cc_platform.c b/arch/x86/kernel/cc_platform.c > new file mode 100644 > index ..3c9bacd3c3f3 > --- /dev/null > +++ b/arch/x86/kernel/cc_platform.c > @@ -0,0 +1,21 @@ > +// SPDX-License-Identifier

[PATCH] drm/panel-orientation-quirks: add Valve Steam Deck

2021-09-11 Thread Simon Ser
Valve's Steam Deck has a 800x1280 LCD screen. Signed-off-by: Simon Ser Cc: Jared Baldridge Cc: Emil Velikov Cc: Daniel Vetter Cc: Hans de Goede --- drivers/gpu/drm/drm_panel_orientation_quirks.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/drm_panel_orientation_

[PATCH] net: mana: Prefer struct_size over open coded arithmetic

2021-09-11 Thread Len Baker
As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrappin

Re: Intel UHD resolutions

2021-09-11 Thread o1bigtenor
On Fri, Sep 10, 2021 at 9:50 PM Randy Dunlap wrote: > Hi, > > I would like to use QHD resolution (2560x1440) with my shiny new > computer and display. That resolution works if I boot Windows 10 > (cough). > > What do I need to do to use that resolution in Linux? > > Dunno if I can 'help' get ever

[PATCH] dma-buf: fix noderef.cocci warnings

2021-09-11 Thread kernel test robot
From: kernel test robot drivers/dma-buf/dma-resv.c:525:7-13: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci CC: Christian König Reported-by: kernel test robot Signed

Re: [PATCH 04/14] dma-buf: use new iterator in dma_resv_get_fences

2021-09-11 Thread kernel test robot
Hi "Christian, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.14 next-20210910] [cannot apply to drm/drm-next] [If your patc

[PATCH v3 0/2] Use "ref" clocks from firmware for DSI PLL VCO parent

2021-09-11 Thread Marijn Suijten
All DSI PHY/PLL drivers were referencing their VCO parent clock by a global name, most of which don't exist or have been renamed. These clock drivers seem to function fine without that except the 14nm driver for sdm6xx [1]. At the same time all DTs provide a "ref" clock as per the requirements of

[PATCH v3 1/2] drm/msm/dsi: Use "ref" fw clock instead of global name for VCO parent

2021-09-11 Thread Marijn Suijten
All DSI PHY/PLL drivers were referencing their VCO parent clock by a global name, most of which don't exist or have been renamed. These clock drivers seem to function fine without that except the 14nm driver for sdm6xx [1]. At the same time all DTs provide a "ref" clock as per the requirements of

[PATCH v3 2/2] clk: qcom: gcc-sdm660: Remove transient global "xo" clock

2021-09-11 Thread Marijn Suijten
The DSI PHY/PLL was relying on a global "xo" clock to be found, but the real clock is named "xo_board" in the DT. The standard nowadays is to never use global clock names anymore but require the firmware (DT) to provide every clock binding explicitly with .fw_name. The DSI PLLs have since been co

Re: [Intel-gfx] [PATCH] drm/i915: Add ww context to intel_dpt_pin (fwd)

2021-09-11 Thread Julia Lawall
I don't seem to have received any other message about this, but from the URL below, the referenced code seems to be: if (IS_ERR(iomem)) { err = PTR_ERR(vma); continue; } It seems that the argument of PTR_ERR should be iomem,

Re: Intel UHD resolutions

2021-09-11 Thread Randy Dunlap
On 9/11/21 4:37 AM, o1bigtenor wrote: On Fri, Sep 10, 2021 at 9:50 PM Randy Dunlap mailto:rdun...@infradead.org>> wrote: Hi, I would like to use QHD resolution (2560x1440) with my shiny new computer and display. That resolution works if I boot Windows 10 (cough). What do

Re: [PATCH 2/2] drm/msm/dpu: Fix timeout issues on command mode panels

2021-09-11 Thread AngeloGioacchino Del Regno
Il 10/09/21 23:48, Marijn Suijten ha scritto: Hi Angelo! On 2021-09-01 19:43:47, AngeloGioacchino Del Regno wrote: In function dpu_encoder_phys_cmd_wait_for_commit_done we are always checking if the relative CTL is started by waiting for an interrupt to fire: it is fine to do that, but then som

[PATCH v2 2/2] drm/msm/dpu: Fix timeout issues on command mode panels

2021-09-11 Thread AngeloGioacchino Del Regno
In function dpu_encoder_phys_cmd_wait_for_commit_done we are always checking if the relative CTL is started by waiting for an interrupt to fire: it is fine to do that, but then sometimes we call this function while the CTL is up and has never been put down, but that interrupt gets raised only when

[PATCH v2 1/2] drm/msm/dpu: Add a function to retrieve the current CTL status

2021-09-11 Thread AngeloGioacchino Del Regno
Add a function that returns whether the requested CTL is active or not: this will be used in a later commit to fix command mode panel issues. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 6 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 7 +

[Bug 214369] New: Radeon HD5770 incorrect refresh rate via display port

2021-09-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214369 Bug ID: 214369 Summary: Radeon HD5770 incorrect refresh rate via display port Product: Drivers Version: 2.5 Kernel Version: 5.14.2 Hardware: All OS: Linux Tre

Re: [PATCH V2] video: backlight: Drop maximum brightness override for brightness zero

2021-09-11 Thread Marek Vasut
On 7/13/21 9:16 PM, Marek Vasut wrote: The note in c2adda27d202f ("video: backlight: Add of_find_backlight helper in backlight.c") says that gpio-backlight uses brightness as power state. This has been fixed since in ec665b756e6f7 ("backlight: gpio-backlight: Correct initial power state handling"

Re: [PATCH] drm/panel-orientation-quirks: add Valve Steam Deck

2021-09-11 Thread Sam Ravnborg
Hi Simon, On Sat, Sep 11, 2021 at 10:24:40AM +, Simon Ser wrote: > Valve's Steam Deck has a 800x1280 LCD screen. > > Signed-off-by: Simon Ser > Cc: Jared Baldridge > Cc: Emil Velikov > Cc: Daniel Vetter > Cc: Hans de Goede The sorting is off - "Valve Steam Deck" comes before "VIOS LTH17

RE: [PATCH] net: mana: Prefer struct_size over open coded arithmetic

2021-09-11 Thread Haiyang Zhang
> -Original Message- > From: Len Baker > Sent: Saturday, September 11, 2021 6:28 AM > To: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > Wei Liu ; Dexuan Cui ; David S. > Miller ; Jakub Kicinski ; Sumit > Semwal ; Christian König > ; Kees Cook > Cc: Len Baker ; Colin Ian King