Re: [ANNOUNCE] upcoming mandated dim upgrade due to drm-intel branch change
On Mon, 30 Nov 2020, Jani Nikula wrote: > TL;DR: > - On 2020-12-05, drm-intel-next-queued will be decommissioned > - drm-intel committers need to start using drm-intel-next instead > - Everyone needs to upgrade dim *after* the change This has now been done. Please update dim, and start using drm-intel-next for applying i915 patches. Thank you. BR, Jani. > Full story: > > For historical reasons, we've had separate drm-intel-next-queued > ("dinq") and drm-intel-next ("din") branches for development and pull > requests, respectively. This split has not been necessary for a while > now, so we'll finally remove dinq, and start applying patches directly > to drm-intel-next. > > We'll make the switch on 2020-12-05. > > This change requires a flag-day change in dim, i.e. everyone will need > to upgrade dim *after* the switch. (The details of the flag-day change > are covered in [1].) > > All the current dinq related commands and aliases (such as 'dim conq', > 'dim aq', and 'dim pq') will continue to work, except they'll operate on > drm-intel-next. > > > BR, > Jani. > > > [1] http://marc.info/?i=20201113095658.16655-1-jani.nik...@intel.com -- Jani Nikula, Intel Open Source Graphics Center ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210467] amdgpu Vega 3 lock MCLK on 1200mhz
https://bugzilla.kernel.org/show_bug.cgi?id=210467 --- Comment #5 from Alexey (intervio...@gmail.com) --- Created attachment 293959 --> https://bugzilla.kernel.org/attachment.cgi?id=293959&action=edit lshw what other data to provide? what to debug? -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210517] New: nouveau: DRM: failed to map fb: -28 (GeForce 6600 LE, ppc64)
https://bugzilla.kernel.org/show_bug.cgi?id=210517 Bug ID: 210517 Summary: nouveau: DRM: failed to map fb: -28 (GeForce 6600 LE, ppc64) Product: Drivers Version: 2.5 Kernel Version: 5.10-rc6 Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-...@kernel-bugs.osdl.org Reporter: erhar...@mailbox.org Regression: Yes Created attachment 293963 --> https://bugzilla.kernel.org/attachment.cgi?id=293963&action=edit dmesg (kernel 5.10-rc6, PowerMac G5 11,2) With kernel 5.10-rc6 I only get a blank screen at boot, as soon as the display is switching from OpenFirmware to nouveau DRM. With kernel 5.9.12 this works fine. Also 5.10-rc6 with a Radeon X1600 works fine. # grep nouveau dmesg_510-rc6_g5 fb0: switching to nouveaufb from OFfb NVDA,Displ nouveau :0a:00.0: NVIDIA NV43 (043200a4) nouveau :0a:00.0: bios: version 05.43.02.75.00 nouveau :0a:00.0: fb: 128 MiB DDR1 nouveau :0a:00.0: DRM: VRAM: 124 MiB nouveau :0a:00.0: DRM: GART: 512 MiB nouveau :0a:00.0: DRM: TMDS table version 1.1 nouveau :0a:00.0: DRM: DCB version 3.0 nouveau :0a:00.0: DRM: DCB outp 00: 01000100 0028 nouveau :0a:00.0: DRM: DCB outp 01: 03000102 nouveau :0a:00.0: DRM: DCB outp 02: 04011210 0028 nouveau :0a:00.0: DRM: DCB outp 03: 02111212 02000100 nouveau :0a:00.0: DRM: DCB outp 04: 02011211 0020c070 nouveau :0a:00.0: DRM: DCB conn 00: 1030 nouveau :0a:00.0: DRM: DCB conn 01: 2130 nouveau :0a:00.0: DRM: failed to initialise sync subsystem, -28 nouveau :0a:00.0: DRM: Setting dpms mode 3 on TV encoder (output 4) nouveau :0a:00.0: DRM: failed to map fb: -28 [drm] Initialized nouveau 1.3.1 20120801 for :0a:00.0 on minor 0 # grep nouveau dmesg_5912_g5 fb0: switching to nouveaufb from OFfb NVDA,Displ nouveau :0a:00.0: NVIDIA NV43 (043200a4) nouveau :0a:00.0: bios: version 05.43.02.75.00 nouveau :0a:00.0: fb: 128 MiB DDR1 nouveau :0a:00.0: DRM: VRAM: 124 MiB nouveau :0a:00.0: DRM: GART: 512 MiB nouveau :0a:00.0: DRM: TMDS table version 1.1 nouveau :0a:00.0: DRM: DCB version 3.0 nouveau :0a:00.0: DRM: DCB outp 00: 01000100 0028 nouveau :0a:00.0: DRM: DCB outp 01: 03000102 nouveau :0a:00.0: DRM: DCB outp 02: 04011210 0028 nouveau :0a:00.0: DRM: DCB outp 03: 02111212 02000100 nouveau :0a:00.0: DRM: DCB outp 04: 02011211 0020c070 nouveau :0a:00.0: DRM: DCB conn 00: 1030 nouveau :0a:00.0: DRM: DCB conn 01: 2130 nouveau :0a:00.0: DRM: MM: using M2MF for buffer copies nouveau :0a:00.0: DRM: Setting dpms mode 3 on TV encoder (output 4) nouveau :0a:00.0: DRM: allocated 1680x1050 fb: 0x9000, bo 4e24135e nouveau :0a:00.0: [drm] fb0: nouveaudrmfb frame buffer device [drm] Initialized nouveau 1.3.1 20120801 for :0a:00.0 on minor 0 Some data about the card: # lspci -v -s :0a:00.0 :0a:00.0 VGA compatible controller: NVIDIA Corporation NV43 [GeForce 6600 LE] (rev a2) (prog-if 00 [VGA controller]) Subsystem: NVIDIA Corporation NV43 [GeForce 6600 LE] Device tree node: /sys/firmware/devicetree/base/pci@0,f000/NVDA,Parent@0 Flags: bus master, fast devsel, latency 0, IRQ 17 Memory at b200 (32-bit, non-prefetchable) [size=16M] Memory at b800 (64-bit, prefetchable) [size=128M] Memory at b100 (64-bit, non-prefetchable) [size=16M] Expansion ROM at b000 [disabled] [size=128K] Capabilities: [60] Power Management version 2 Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [78] Express Endpoint, MSI 00 Capabilities: [100] Virtual Channel Capabilities: [128] Power Budgeting Kernel modules: nouveau Some data about the machine: # inxi -b --no-host System:Kernel: 5.9.12-gentoo-PowerMacG5 ppc64 bits: 64 Desktop: MATE 1.24.1 Distro: Gentoo Base System release 2.7 Machine: Type: PowerPC Device System: PowerMac11 2 details: PowerMac11 2 rev: 1.1 (pvr 0044 0101) serial: R6V CPU: Info: Dual Core PPC970MP altivec supported [MCP] speed: 2300 MHz min/max: 1150/2300 MHz Graphics: Device-1: NVIDIA NV43 [GeForce 6600 LE] driver: N/A Device-2: Advanced Micro Devices [AMD/ATI] RV530 [Radeon X1600 PRO] driver: radeon v: kernel Display: x11 server: X.Org 1.20.8 driver: ati,radeon resolution: 1680x1050~60Hz OpenGL: renderer: ATI RV530 v: 2.1 Mesa 20.3.0 Network: Device-1: Broadcom and subsidiaries NetXtreme BCM5780 Gigabit Ethernet driver: tg3 Device-2: Broadcom and subsidiaries NetXtreme BCM5780 Gigabit Ethernet driver: tg3 Device-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 -- You ar
[Bug 210517] nouveau: DRM: failed to map fb: -28 (GeForce 6600 LE, ppc64)
https://bugzilla.kernel.org/show_bug.cgi?id=210517 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 293965 --> https://bugzilla.kernel.org/attachment.cgi?id=293965&action=edit dmesg (kernel 5.9.12, PowerMac G5 11,2) -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210517] nouveau: DRM: failed to map fb: -28 (GeForce 6600 LE, ppc64)
https://bugzilla.kernel.org/show_bug.cgi?id=210517 --- Comment #2 from Erhard F. (erhar...@mailbox.org) --- Created attachment 293967 --> https://bugzilla.kernel.org/attachment.cgi?id=293967&action=edit kernel .config (kernel 5.10-rc6, PowerMac G5 11,2) -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210517] nouveau: DRM: failed to map fb: -28 (GeForce 6600 LE, ppc64)
https://bugzilla.kernel.org/show_bug.cgi?id=210517 --- Comment #3 from Erhard F. (erhar...@mailbox.org) --- Created attachment 293969 --> https://bugzilla.kernel.org/attachment.cgi?id=293969&action=edit kernel .config (kernel 5.9.12, PowerMac G5 11,2) -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm: drivers may provide multiple primary planes per CRTC
Sorry, I think I lost track of this thread at some point and forgot about it. That said… On Friday, August 7th, 2020 at 3:06 PM, Daniel Vetter wrote: > On Fri, Aug 07, 2020 at 12:38:02PM +0300, Pekka Paalanen wrote: > > On Fri, 7 Aug 2020 11:07:06 +0200 > > Daniel Vetter wrote: > > > > > On Thu, Aug 06, 2020 at 10:33:31AM +, Simon Ser wrote: > > > > Some drivers may expose primary planes compatible with multiple CRTCs. > > > > Make this clear in the docs: the current wording may be misunderstood as > > > > "exactly one primary plane per CRTC". > > > > > > > > Signed-off-by: Simon Ser > > > > Cc: Daniel Vetter > > > > --- > > > > drivers/gpu/drm/drm_plane.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c > > > > index b7b90b3a2e38..108a922e8c23 100644 > > > > --- a/drivers/gpu/drm/drm_plane.c > > > > +++ b/drivers/gpu/drm/drm_plane.c > > > > @@ -49,8 +49,8 @@ > > > > * &struct drm_plane (possibly as part of a larger structure) and > > > > registers it > > > > * with a call to drm_universal_plane_init(). > > > > * > > > > - * Cursor and overlay planes are optional. All drivers should provide > > > > one > > > > - * primary plane per CRTC to avoid surprising userspace too much. See > > > > enum > > > > + * Cursor and overlay planes are optional. All drivers should provide > > > > at least > > > > + * one primary plane per CRTC to avoid surprising userspace too much. > > > > See enum > > > > > > I think that's even more confusing, since this reads like there could be > > > multiple primary planes for a specific CRTC. That's not the case, there' > > > only one pointer going from drm_crtc->primary to a drm_plane in the > > > kernel. > > > > There could be multiple primary planes *usable* for a specific CRTC but > > just one used at a time, right? > > I'm not sure what you mean here, the crtc->primary link is invariant over > the lifetime of a driver load. You can't pick a different one, that's set > at driver init before drm_dev_register (and hence before userspace ever > sees anything). OK. I'm personally not very interested in documenting legacy bits, so I'll skip that. I'm mainly interested here in making it clear possible_crtcs for a primary plane can have more than one bit set. Because of the paragraph in the current docs, some user-space developers have understood "more than one bit set in possible_crtcs for a primary plane is a kernel bug". I'll send a v2 that makes it clear these pointers are for legacy uAPI. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm: fix typos in plane and CRTC overviews
Fix one missing letter, and one duplicate struct field reference. Signed-off-by: Simon Ser Cc: Daniel Vetter --- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/drm_plane.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index f927976eca50..8ece63e25f5a 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -67,7 +67,7 @@ * &drm_crtc_funcs.page_flip and &drm_crtc_funcs.cursor_set2, and other legacy * operations like &drm_crtc_funcs.gamma_set. For atomic drivers all these * features are controlled through &drm_property and - * &drm_mode_config_funcs.atomic_check and &drm_mode_config_funcs.atomic_check. + * &drm_mode_config_funcs.atomic_check. */ /** diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index e6231947f987..385801dd21f9 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -40,7 +40,7 @@ * A plane represents an image source that can be blended with or overlayed on * top of a CRTC during the scanout process. Planes take their input data from a * &drm_framebuffer object. The plane itself specifies the cropping and scaling - * of that image, and where it is placed on the visible are of a display + * of that image, and where it is placed on the visible area of a display * pipeline, represented by &drm_crtc. A plane can also have additional * properties that specify how the pixels are positioned and blended, like * rotation or Z-position. All these properties are stored in &drm_plane_state. -- 2.29.2 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210467] amdgpu Vega 3 lock MCLK on 1200mhz
https://bugzilla.kernel.org/show_bug.cgi?id=210467 --- Comment #6 from Alexey (intervio...@gmail.com) --- Created attachment 293971 --> https://bugzilla.kernel.org/attachment.cgi?id=293971&action=edit glxinfo -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm: rework description of primary and cursor planes
The previous wording could be understood by user-space evelopers as "a primary/cursor plane is only compatible with a single CRTC" [1]. Reword the planes description to make it clear the DRM-internal drm_crtc.primary and drm_crtc.cursor planes are for legacy uAPI. [1]: https://github.com/swaywm/wlroots/pull/2333#discussion_r456788057 Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Pekka Paalanen --- drivers/gpu/drm/drm_crtc.c | 3 +++ drivers/gpu/drm/drm_plane.c | 16 +--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 74090fc3aa55..c71b134d663a 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -256,6 +256,9 @@ struct dma_fence *drm_crtc_create_fence(struct drm_crtc *crtc) * planes). For really simple hardware which has only 1 plane look at * drm_simple_display_pipe_init() instead. * + * The @primary and @cursor planes are only relevant for legacy uAPI, see + * &drm_crtc.primary and &drm_crtc.cursor. + * * Returns: * Zero on success, error code on failure. */ diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index e6231947f987..7a5697bc9e04 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -49,14 +49,16 @@ * &struct drm_plane (possibly as part of a larger structure) and registers it * with a call to drm_universal_plane_init(). * - * Cursor and overlay planes are optional. All drivers should provide one - * primary plane per CRTC to avoid surprising userspace too much. See enum - * drm_plane_type for a more in-depth discussion of these special uapi-relevant - * plane types. Special planes are associated with their CRTC by calling - * drm_crtc_init_with_planes(). - * * The type of a plane is exposed in the immutable "type" enumeration property, - * which has one of the following values: "Overlay", "Primary", "Cursor". + * which has one of the following values: "Overlay", "Primary", "Cursor" (see + * enum drm_plane_type). A plane can be compatible with multiple CRTCs, see + * &drm_plane.possible_crtcs. + * + * Legacy uAPI doesn't expose the primary and cursor planes directly. DRM core + * relies on the driver to set the primary and optionally the cursor plane used + * for legacy IOCTLs. This is done by calling drm_crtc_init_with_planes(). All + * drivers should provide one primary plane per CRTC to avoid surprising legacy + * userspace too much. */ static unsigned int drm_num_planes(struct drm_device *dev) -- 2.29.2 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm: fix typos in plane and CRTC overviews
Hi Simon. On Sun, Dec 06, 2020 at 03:31:53PM +, Simon Ser wrote: > Fix one missing letter, and one duplicate struct field reference. > > Signed-off-by: Simon Ser > Cc: Daniel Vetter This was indeed so simple I dare to say: Reviewed-by: Sam Ravnborg ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 1/4] irq: export kstat_irqs
On Sun, 2020-12-06 at 17:40 +0100, Thomas Gleixner wrote: > On Sat, Dec 05 2020 at 12:39, Jarkko Sakkinen wrote: > > On Fri, Dec 04, 2020 at 06:43:37PM -0700, Jerry Snitselaar wrote: > > > To try and detect potential interrupt storms that > > > have been occurring with tpm_tis devices it was suggested > > > to use kstat_irqs() to get the number of interrupts. > > > Since tpm_tis can be built as a module it needs kstat_irqs > > > exported. > > > > I think you should also have a paragraph explicitly stating that > > i915_pmu.c contains a duplicate of kstat_irqs() because it is not > > exported as of today. It adds a lot more weight to this given that > > there is already existing mainline usage (kind of). > > It's abusage and just the fact that it exists is not an argument by > itself. What we want is a count of the interrupts to see if we're having an interrupt storm from the TPM device (some seem to be wired to fire the interrupt even when there's no event to warrant it). Since kstat_irqs_user() does the correct RCU locking, should we be using that instead? James ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 0/13] drivers/video: W=1 warning fixes
Following the great work of Lee Jones in other subsystems here is a set of patches that address all remaining W=1 warnings in drivers/video/. Lee Jones already fixed all warnings in video/backlight/ so this is mostly fbdev related fixes. The general approach used were: - Fix kernel-doc, this is often very trivial - Drop unused local variables Build tested on a set of architectures with various configs. The patches do not depend on each other and fixes for one driver are kept in a single patch. v2: - Updated subject of the patches to tell what was fixed (Lee) - Fixed build error in one patch (kernel test robot) - A few editorials updates to the changelog messages v3: - Applied patches that was acked - thanks Thomas! - Updated patches after feedback from Randy and Thomas - Added several new patches to cover warnings that triggers with other architectures than the one I used for v1 + v2 - Included one sh specific fix that handle a corner-case, let's see what the sh people say to that - One fix to previous set of patches to fix an issue reported by Coverity (By Colin) Sam Sam Ravnborg (13): video: fbdev: hgafb: Fix kernel-doc warnings video: fbdev: core: Fix kernel-doc warnings in fbmon + fb_notify video: fbdev: omapfb: Fix set but not used warnings in hdmi*_core video: fbdev: uvesafb: Fix set but not used warning sh: Fix set but not used warnings with !CONFIG_MMU video: fbdev: sparc drivers: fix kernel-doc warnings for blank_mode video: fbdev: mmp: Fix kernel-doc warning for lcd_spi_write video: fbdev: wmt_ge_rops: Fix function not declared warnings video: fbdev: goldfishfb: Fix defined but not used warning video: fbdev: gbefb: Fix set but not used warning video: fbdev: efifb: Fix set but not used warning for screen_pitch video: fbdev: controlfb: Fix set but not used warnings video: fbdev: sis: Drop useless call to SiS_GetResInfo() arch/sh/include/asm/io.h | 2 +- drivers/video/fbdev/bw2.c | 2 +- drivers/video/fbdev/cg3.c | 2 +- drivers/video/fbdev/cg6.c | 2 +- drivers/video/fbdev/controlfb.c | 4 ++-- drivers/video/fbdev/core/fb_notify.c | 10 ++ drivers/video/fbdev/core/fbmon.c | 2 +- drivers/video/fbdev/efifb.c | 3 +-- drivers/video/fbdev/ffb.c | 2 +- drivers/video/fbdev/gbefb.c | 4 +--- drivers/video/fbdev/goldfishfb.c | 2 ++ drivers/video/fbdev/hgafb.c | 10 +- drivers/video/fbdev/leo.c | 2 +- drivers/video/fbdev/mmp/hw/mmp_spi.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | 4 ++-- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 4 ++-- drivers/video/fbdev/p9100.c | 2 +- drivers/video/fbdev/sis/init.c| 1 - drivers/video/fbdev/tcx.c | 2 +- drivers/video/fbdev/uvesafb.c | 2 ++ drivers/video/fbdev/wmt_ge_rops.c | 1 + 21 files changed, 38 insertions(+), 27 deletions(-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 01/13] video: fbdev: hgafb: Fix kernel-doc warnings
Fix kernel-doc comments. v2: - Updated subject (Lee) v3: - Add space after ':' (Randy) - Fix name of function in comment Signed-off-by: Sam Ravnborg Cc: Ferenc Bakonyi Cc: linux-nvi...@lists.surfsouth.com Cc: Lee Jones --- drivers/video/fbdev/hgafb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/hgafb.c b/drivers/video/fbdev/hgafb.c index a45fcff1461f..8bbac7182ad3 100644 --- a/drivers/video/fbdev/hgafb.c +++ b/drivers/video/fbdev/hgafb.c @@ -357,8 +357,8 @@ static int hga_card_detect(void) /** * hgafb_open - open the framebuffer device - * @info:pointer to fb_info object containing info for current hga board - * @int:open by console system or userland. + * @info: pointer to fb_info object containing info for current hga board + * @init: open by console system or userland. */ static int hgafb_open(struct fb_info *info, int init) @@ -370,9 +370,9 @@ static int hgafb_open(struct fb_info *info, int init) } /** - * hgafb_open - open the framebuffer device - * @info:pointer to fb_info object containing info for current hga board - * @int:open by console system or userland. + * hgafb_release - open the framebuffer device + * @info: pointer to fb_info object containing info for current hga board + * @init: open by console system or userland. */ static int hgafb_release(struct fb_info *info, int init) -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 02/13] video: fbdev: core: Fix kernel-doc warnings in fbmon + fb_notify
Fix kernel-doc warnings reported when using W=1 v2: - Improve subject (Lee) v3: - Add RETURNS documentation (Thomas) Signed-off-by: Sam Ravnborg Cc: Lee Jones Cc: Sam Ravnborg Cc: Randy Dunlap Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: "Alexander A. Klimov" --- drivers/video/fbdev/core/fb_notify.c | 10 ++ drivers/video/fbdev/core/fbmon.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fb_notify.c b/drivers/video/fbdev/core/fb_notify.c index 74c2da528884..4e39c61fae1f 100644 --- a/drivers/video/fbdev/core/fb_notify.c +++ b/drivers/video/fbdev/core/fb_notify.c @@ -19,6 +19,9 @@ static BLOCKING_NOTIFIER_HEAD(fb_notifier_list); /** * fb_register_client - register a client notifier * @nb: notifier block to callback on events + * + * RETURNS: + * 0 on success, negative error code on failure. */ int fb_register_client(struct notifier_block *nb) { @@ -29,6 +32,9 @@ EXPORT_SYMBOL(fb_register_client); /** * fb_unregister_client - unregister a client notifier * @nb: notifier block to callback on events + * + * RETURNS: + * 0 on success, negative error code on failure. */ int fb_unregister_client(struct notifier_block *nb) { @@ -38,7 +44,11 @@ EXPORT_SYMBOL(fb_unregister_client); /** * fb_notifier_call_chain - notify clients of fb_events + * @val: value passed to callback + * @v: pointer passed to callback * + * RETURNS: + * The return value of the last notifier function */ int fb_notifier_call_chain(unsigned long val, void *v) { diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index 1bf82dbc9e3c..b0e690f41025 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -605,6 +605,7 @@ static void get_detailed_timing(unsigned char *block, * fb_create_modedb - create video mode database * @edid: EDID data * @dbsize: database size + * @specs: monitor specifications, may be NULL * * RETURNS: struct fb_videomode, @dbsize contains length of database * @@ -1100,7 +1101,6 @@ static u32 fb_get_hblank_by_hfreq(u32 hfreq, u32 xres) *2 * M *M = 300; *C = 30; - */ static u32 fb_get_hblank_by_dclk(u32 dclk, u32 xres) { -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 03/13] video: fbdev: omapfb: Fix set but not used warnings in hdmi*_core
Fix a few W=1 warnings about unused assignments. Drop the unused error code. v2: - Subject updated (Lee) Signed-off-by: Sam Ravnborg Cc: Sam Ravnborg Cc: Qilong Zhang Cc: "Alexander A. Klimov" Cc: Daniel Vetter Cc: Lee Jones --- drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c | 4 ++-- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c index 726c190862d4..e6363a420933 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi4_core.c @@ -679,7 +679,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, struct hdmi_audio_format audio_format; struct hdmi_audio_dma audio_dma; struct hdmi_core_audio_config acore; - int err, n, cts, channel_count; + int n, cts, channel_count; unsigned int fs_nr; bool word_length_16b = false; @@ -741,7 +741,7 @@ int hdmi4_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, return -EINVAL; } - err = hdmi_compute_acr(pclk, fs_nr, &n, &cts); + hdmi_compute_acr(pclk, fs_nr, &n, &cts); /* Audio clock regeneration settings */ acore.n = n; diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c index eda29d3032e1..cb63bc0e92ca 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c @@ -790,7 +790,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, struct hdmi_audio_format audio_format; struct hdmi_audio_dma audio_dma; struct hdmi_core_audio_config core_cfg; - int err, n, cts, channel_count; + int n, cts, channel_count; unsigned int fs_nr; bool word_length_16b = false; @@ -833,7 +833,7 @@ int hdmi5_audio_config(struct hdmi_core_data *core, struct hdmi_wp_data *wp, return -EINVAL; } - err = hdmi_compute_acr(pclk, fs_nr, &n, &cts); + hdmi_compute_acr(pclk, fs_nr, &n, &cts); core_cfg.n = n; core_cfg.cts = cts; -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 04/13] video: fbdev: uvesafb: Fix set but not used warning
Fix W=1 warning by deleting unused local variable. v2: - Updated subject (Lee) v3: - Return early in case of an error (Thomas) Signed-off-by: Sam Ravnborg Cc: Michal Januszewski Cc: linux-fb...@vger.kernel.org Cc: Lee Jones --- drivers/video/fbdev/uvesafb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c index 6c9cfab39313..4df6772802d7 100644 --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -560,6 +560,8 @@ static int uvesafb_vbe_getpmi(struct uvesafb_ktask *task, task->t.regs.eax = 0x4f0a; task->t.regs.ebx = 0x0; err = uvesafb_exec(task); + if (err) + return err; if ((task->t.regs.eax & 0x) != 0x4f || task->t.regs.es < 0xc000) { par->pmi_setpal = par->ypan = 0; -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 05/13] sh: Fix set but not used warnings with !CONFIG_MMU
Building fbdev drivers for sh with W=1 produces the following warning: tmiofb.c: In function ‘tmiofb_remove’: tmiofb.c:805:21: warning: variable ‘par’ set but not used This is with allmodconfig and ARCH=sh This boiled down to iounmap() defined as empty for !CONFIG_MMU. Fix this by by adding "(void)addr;" to tell the compiler the argument to iounmap() should be considered used. Signed-off-by: Sam Ravnborg Cc: Thomas Zimmermann Cc: Lee Jones Cc: Rich Felker Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Mike Rapoport Cc: Kuninori Morimoto Cc: Peter Zijlstra Cc: Sam Ravnborg Cc: Andrew Morton --- arch/sh/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 6d5c6463bc07..5ad56c6c1e1e 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -271,7 +271,7 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, #endif /* CONFIG_HAVE_IOREMAP_PROT */ #else /* CONFIG_MMU */ -#define iounmap(addr) do { } while (0) +#define iounmap(addr) do { (void)addr; } while (0) #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) #endif /* CONFIG_MMU */ -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 07/13] video: fbdev: mmp: Fix kernel-doc warning for lcd_spi_write
Add missing parameter and drop parameter that is not present Signed-off-by: Sam Ravnborg Cc: Sam Ravnborg Cc: Andrzej Hajda Cc: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/mmp/hw/mmp_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/mmp/hw/mmp_spi.c b/drivers/video/fbdev/mmp/hw/mmp_spi.c index 1911a47769b6..16401eb95c6c 100644 --- a/drivers/video/fbdev/mmp/hw/mmp_spi.c +++ b/drivers/video/fbdev/mmp/hw/mmp_spi.c @@ -17,8 +17,8 @@ /** * spi_write - write command to the SPI port + * @spi: the SPI device. * @data: can be 8/16/32-bit, MSB justified data to write. - * @len: data length. * * Wait bus transfer complete IRQ. * The caller is expected to perform the necessary locking. -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 06/13] video: fbdev: sparc drivers: fix kernel-doc warnings for blank_mode
Fix kernel-doc warnings caused by a wrong parameter name blank_mode => blank Signed-off-by: Sam Ravnborg Cc: Sam Ravnborg --- drivers/video/fbdev/bw2.c | 2 +- drivers/video/fbdev/cg3.c | 2 +- drivers/video/fbdev/cg6.c | 2 +- drivers/video/fbdev/ffb.c | 2 +- drivers/video/fbdev/leo.c | 2 +- drivers/video/fbdev/p9100.c | 2 +- drivers/video/fbdev/tcx.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/bw2.c b/drivers/video/fbdev/bw2.c index 0d9a6bb57a09..e7702fe1fe7d 100644 --- a/drivers/video/fbdev/bw2.c +++ b/drivers/video/fbdev/bw2.c @@ -116,7 +116,7 @@ struct bw2_par { /** * bw2_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int diff --git a/drivers/video/fbdev/cg3.c b/drivers/video/fbdev/cg3.c index 77f6470ce665..bdcc3f6ab666 100644 --- a/drivers/video/fbdev/cg3.c +++ b/drivers/video/fbdev/cg3.c @@ -179,7 +179,7 @@ static int cg3_setcolreg(unsigned regno, /** * cg3_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int cg3_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/cg6.c b/drivers/video/fbdev/cg6.c index a1c68cd48d7e..97ef43c25974 100644 --- a/drivers/video/fbdev/cg6.c +++ b/drivers/video/fbdev/cg6.c @@ -511,7 +511,7 @@ static int cg6_setcolreg(unsigned regno, /** * cg6_blank - Blanks the display. * - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int cg6_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/ffb.c b/drivers/video/fbdev/ffb.c index 948b73184433..b3d580e57221 100644 --- a/drivers/video/fbdev/ffb.c +++ b/drivers/video/fbdev/ffb.c @@ -667,7 +667,7 @@ static int ffb_setcolreg(unsigned regno, /** * ffb_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int ffb_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/leo.c b/drivers/video/fbdev/leo.c index 40b11cce0ad6..3eb0f3583f4f 100644 --- a/drivers/video/fbdev/leo.c +++ b/drivers/video/fbdev/leo.c @@ -308,7 +308,7 @@ static int leo_setcolreg(unsigned regno, /** * leo_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int leo_blank(int blank, struct fb_info *info) diff --git a/drivers/video/fbdev/p9100.c b/drivers/video/fbdev/p9100.c index 6da672e92643..4e88a0a195ad 100644 --- a/drivers/video/fbdev/p9100.c +++ b/drivers/video/fbdev/p9100.c @@ -175,7 +175,7 @@ static int p9100_setcolreg(unsigned regno, /** * p9100_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int diff --git a/drivers/video/fbdev/tcx.c b/drivers/video/fbdev/tcx.c index 34b2e5b6e84a..1638a40fed22 100644 --- a/drivers/video/fbdev/tcx.c +++ b/drivers/video/fbdev/tcx.c @@ -196,7 +196,7 @@ static int tcx_setcolreg(unsigned regno, /** * tcx_blank - Optional function. Blanks the display. - * @blank_mode: the blank mode we want. + * @blank: the blank mode we want. * @info: frame buffer structure that represents a single frame buffer */ static int -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 08/13] video: fbdev: wmt_ge_rops: Fix function not declared warnings
Include own header to fix "function not declared" warnings. Signed-off-by: Sam Ravnborg Cc: Tony Prisk Cc: linux-arm-ker...@lists.infradead.org --- drivers/video/fbdev/wmt_ge_rops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/wmt_ge_rops.c b/drivers/video/fbdev/wmt_ge_rops.c index 2445cfe617a9..42255d27a1db 100644 --- a/drivers/video/fbdev/wmt_ge_rops.c +++ b/drivers/video/fbdev/wmt_ge_rops.c @@ -11,6 +11,7 @@ #include #include #include "core/fb_draw.h" +#include "wmt_ge_rops.h" #define GE_COMMAND_OFF 0x00 #define GE_DEPTH_OFF 0x04 -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 09/13] video: fbdev: goldfishfb: Fix defined but not used warning
The goldfish_fb_acpi_match table is only used with ACPI enabled. Ifdef it out unless it is needed. This is a similar fix to what other acpi drivers do. Signed-off-by: Sam Ravnborg Cc: Sam Ravnborg --- drivers/video/fbdev/goldfishfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c index 9c83ec3f8e1f..2b885cd046fe 100644 --- a/drivers/video/fbdev/goldfishfb.c +++ b/drivers/video/fbdev/goldfishfb.c @@ -305,11 +305,13 @@ static const struct of_device_id goldfish_fb_of_match[] = { }; MODULE_DEVICE_TABLE(of, goldfish_fb_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id goldfish_fb_acpi_match[] = { { "GFSH0004", 0 }, { }, }; MODULE_DEVICE_TABLE(acpi, goldfish_fb_acpi_match); +#endif static struct platform_driver goldfish_fb_driver = { .probe = goldfish_fb_probe, -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 11/13] video: fbdev: efifb: Fix set but not used warning for screen_pitch
screen_pitch was asssigned a value which was never used. Drop it to fix the warning Signed-off-by: Sam Ravnborg Cc: Peter Jones Cc: linux-fb...@vger.kernel.org --- drivers/video/fbdev/efifb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index e57c00824965..b80ba3d2a9b8 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -139,7 +139,7 @@ static bool efifb_bgrt_sanity_check(struct screen_info *si, u32 bmp_width) static void efifb_show_boot_graphics(struct fb_info *info) { - u32 bmp_width, bmp_height, bmp_pitch, screen_pitch, dst_x, y, src_y; + u32 bmp_width, bmp_height, bmp_pitch, dst_x, y, src_y; struct screen_info *si = &screen_info; struct bmp_file_header *file_header; struct bmp_dib_header *dib_header; @@ -193,7 +193,6 @@ static void efifb_show_boot_graphics(struct fb_info *info) bmp_width = dib_header->width; bmp_height = abs(dib_header->height); bmp_pitch = round_up(3 * bmp_width, 4); - screen_pitch = si->lfb_linelength; if ((file_header->bitmap_offset + bmp_pitch * bmp_height) > bgrt_image_size) -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 10/13] video: fbdev: gbefb: Fix set but not used warning
The variable "x" was set but never used. Drop the redundant assignments. Signed-off-by: Sam Ravnborg Cc: Sam Ravnborg --- drivers/video/fbdev/gbefb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/gbefb.c b/drivers/video/fbdev/gbefb.c index 31270a8986e8..c5b99a4861e8 100644 --- a/drivers/video/fbdev/gbefb.c +++ b/drivers/video/fbdev/gbefb.c @@ -198,7 +198,7 @@ static void gbe_reset(void) static void gbe_turn_off(void) { int i; - unsigned int val, x, y, vpixen_off; + unsigned int val, y, vpixen_off; gbe_turned_on = 0; @@ -249,7 +249,6 @@ static void gbe_turn_off(void) for (i = 0; i < 10; i++) { val = gbe->vt_xy; - x = GET_GBE_FIELD(VT_XY, X, val); y = GET_GBE_FIELD(VT_XY, Y, val); if (y < vpixen_off) break; @@ -260,7 +259,6 @@ static void gbe_turn_off(void) "gbefb: wait for vpixen_off timed out\n"); for (i = 0; i < 1; i++) { val = gbe->vt_xy; - x = GET_GBE_FIELD(VT_XY, X, val); y = GET_GBE_FIELD(VT_XY, Y, val); if (y > vpixen_off) break; -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 12/13] video: fbdev: controlfb: Fix set but not used warnings
The controlfb driver has a number of dummy defines for IO operations. They were introduced in commit a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support"). The write variants did not use their value parameter in the dummy versions, resulting in set but not used warnings. Fix this by adding "(void)val" to silence the compiler. Signed-off-by: Sam Ravnborg Cc: Sam Ravnborg Cc: Bartlomiej Zolnierkiewicz Cc: "Gustavo A. R. Silva" Cc: Michael Ellerman --- drivers/video/fbdev/controlfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c index 2df56bd303d2..509311471d51 100644 --- a/drivers/video/fbdev/controlfb.c +++ b/drivers/video/fbdev/controlfb.c @@ -64,9 +64,9 @@ #undef in_le32 #undef out_le32 #define in_8(addr) 0 -#define out_8(addr, val) +#define out_8(addr, val) (void)(val) #define in_le32(addr) 0 -#define out_le32(addr, val) +#define out_le32(addr, val)(void)(val) #define pgprot_cached_wthru(prot) (prot) #else static void invalid_vram_cache(void __force *addr) -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH v3 13/13] video: fbdev: sis: Drop useless call to SiS_GetResInfo()
Coverity reported: Useless call (USELESS_CALL) side_effect_free: Calling SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex) is only useful for its return value, which is ignored. And this is correct - so drop the call. Signed-off-by: Sam Ravnborg Reported-by: Colin Ian King Addresses-Coverity: ("Useless call") Cc: Colin Ian King Cc: Thomas Winischhofer --- drivers/video/fbdev/sis/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c index b77ea1a8825a..b568c646a76c 100644 --- a/drivers/video/fbdev/sis/init.c +++ b/drivers/video/fbdev/sis/init.c @@ -2659,7 +2659,6 @@ SiS_SetCRT1ModeRegs(struct SiS_Private *SiS_Pr, unsigned short ModeNo, if(SiS_Pr->UseCustomMode) { infoflag = SiS_Pr->CInfoFlag; } else { - SiS_GetResInfo(SiS_Pr, ModeNo, ModeIdIndex); if(ModeNo > 0x13) { infoflag = SiS_Pr->SiS_RefIndex[RRTI].Ext_InfoFlag; } -- 2.27.0 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210517] nouveau: DRM: failed to map fb: -28 (GeForce 6600 LE, ppc64)
https://bugzilla.kernel.org/show_bug.cgi?id=210517 Dave Airlie (airl...@linux.ie) changed: What|Removed |Added CC||airl...@linux.ie --- Comment #4 from Dave Airlie (airl...@linux.ie) --- The fix for this is in Linus' tree already https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/nouveau?id=aea656b0d05ec5b8ed5beb2f94c4dd42ea834e9d -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 02/13] video: fbdev: core: Fix kernel-doc warnings in fbmon + fb_notify
Hi Randy. On Sun, Dec 06, 2020 at 11:37:17AM -0800, Randy Dunlap wrote: > On 12/6/20 11:02 AM, Sam Ravnborg wrote: > > Fix kernel-doc warnings reported when using W=1 > > > > v2: > > - Improve subject (Lee) > > > > v3: > > - Add RETURNS documentation (Thomas) > > Hi Sam, > > Yes, RETURNS: will work. It just looks like any kernel-doc section name, > such as Context: or Note:. > However, the documented format for return info is "Return:". > (see Documentation/doc-guide/kernel-doc.rst) OK, like this? I did not fix any existing uses of RETURNS, thats for another patch. Sam commit 03b7c3ecf7cb51b5429ca0ef58a32bb4dc486610 Author: Sam Ravnborg Date: Sat Nov 28 23:40:49 2020 +0100 video: fbdev: core: Fix kernel-doc warnings in fbmon + fb_notify Fix kernel-doc warnings reported when using W=1 v2: - Improve subject (Lee) v3: - Add RETURNS documentation (Thomas) v4: - Use Return: not RETURNS (Randy) Signed-off-by: Sam Ravnborg Cc: Lee Jones Cc: Sam Ravnborg Cc: Randy Dunlap Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Vetter Cc: "Alexander A. Klimov" diff --git a/drivers/video/fbdev/core/fb_notify.c b/drivers/video/fbdev/core/fb_notify.c index 74c2da528884..10e3b9a74adc 100644 --- a/drivers/video/fbdev/core/fb_notify.c +++ b/drivers/video/fbdev/core/fb_notify.c @@ -19,6 +19,8 @@ static BLOCKING_NOTIFIER_HEAD(fb_notifier_list); /** * fb_register_client - register a client notifier * @nb: notifier block to callback on events + * + * Return: 0 on success, negative error code on failure. */ int fb_register_client(struct notifier_block *nb) { @@ -29,6 +31,8 @@ EXPORT_SYMBOL(fb_register_client); /** * fb_unregister_client - unregister a client notifier * @nb: notifier block to callback on events + * + * Return: 0 on success, negative error code on failure. */ int fb_unregister_client(struct notifier_block *nb) { @@ -38,7 +42,10 @@ EXPORT_SYMBOL(fb_unregister_client); /** * fb_notifier_call_chain - notify clients of fb_events + * @val: value passed to callback + * @v: pointer passed to callback * + * Return: The return value of the last notifier function */ int fb_notifier_call_chain(unsigned long val, void *v) { diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c index 1bf82dbc9e3c..b0e690f41025 100644 --- a/drivers/video/fbdev/core/fbmon.c +++ b/drivers/video/fbdev/core/fbmon.c @@ -605,6 +605,7 @@ static void get_detailed_timing(unsigned char *block, * fb_create_modedb - create video mode database * @edid: EDID data * @dbsize: database size + * @specs: monitor specifications, may be NULL * * RETURNS: struct fb_videomode, @dbsize contains length of database * @@ -1100,7 +1101,6 @@ static u32 fb_get_hblank_by_hfreq(u32 hfreq, u32 xres) *2 * M *M = 300; *C = 30; - */ static u32 fb_get_hblank_by_dclk(u32 dclk, u32 xres) { ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 05/13] sh: Fix set but not used warnings with !CONFIG_MMU
Hi Sam, I love your patch! Yet something to improve: [auto build test ERROR on next-20201204] [also build test ERROR on v5.10-rc6] [cannot apply to tegra-drm/drm/tegra/for-next soc/for-next linus/master drm/drm-next v5.10-rc6 v5.10-rc5 v5.10-rc4] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/drivers-video-W-1-warning-fixes/20201207-030414 base:2996bd3f6ca9ea529b40c369a94b247657abdb4d config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/9c4170037512dc3810cd88f57e3c3a442304b7cf git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sam-Ravnborg/drivers-video-W-1-warning-fixes/20201207-030414 git checkout 9c4170037512dc3810cd88f57e3c3a442304b7cf # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/io.h:13, from include/linux/irq.h:20, from include/asm-generic/hardirq.h:17, from arch/sh/include/asm/hardirq.h:9, from include/linux/hardirq.h:10, from include/linux/interrupt.h:11, from drivers/net/ethernet/xircom/xirc2ps_cs.c:74: drivers/net/ethernet/xircom/xirc2ps_cs.c: In function 'xirc2ps_release': >> arch/sh/include/asm/io.h:274:29: error: void value not ignored as it ought >> to be 274 | #define iounmap(addr) do { (void)addr; } while (0) drivers/net/ethernet/xircom/xirc2ps_cs.c:935:4: note: in expansion of macro 'iounmap' 935 |iounmap(local->dingo_ccr - 0x0800); |^~~ vim +274 arch/sh/include/asm/io.h 272 273 #else /* CONFIG_MMU */ > 274 #define iounmap(addr) do { (void)addr; } while (0) 275 #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) 276 #endif /* CONFIG_MMU */ 277 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 1/4] irq: export kstat_irqs
Thomas Gleixner @ 2020-12-06 10:54 MST: > Jerry, > > On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: > > The proper prefix is 'genirq:' git log kernel/irq/irqdesc.c would have > told you. > >> To try and detect potential interrupt storms that >> have been occurring with tpm_tis devices it was suggested >> to use kstat_irqs() to get the number of interrupts. >> Since tpm_tis can be built as a module it needs kstat_irqs >> exported. > > I'm not really enthused about exporting this without making it at least > safe. Using it from an interrupt handler is obviously safe vs. concurrent > removal, but the next driver writer who thinks this is cool is going to > get it wrong for sure. > > Though I still have to figure out what the advantage of invoking a > function which needs to do a radix tree lookup over a device local > counter is just to keep track of this. > > I'll reply on the TPM part of this as well. > > Thanks, > > tglx I can rework it to use a device local counter. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 2/4] drm/i915/pmu: Use kstat_irqs to get interrupt count
Thomas Gleixner @ 2020-12-06 09:38 MST: > On Fri, Dec 04 2020 at 18:43, Jerry Snitselaar wrote: > >> Now that kstat_irqs is exported, get rid of count_interrupts in >> i915_pmu.c >> --- a/drivers/gpu/drm/i915/i915_pmu.c >> +++ b/drivers/gpu/drm/i915/i915_pmu.c >> @@ -423,22 +423,6 @@ static enum hrtimer_restart i915_sample(struct hrtimer >> *hrtimer) >> return HRTIMER_RESTART; >> } >> >> -static u64 count_interrupts(struct drm_i915_private *i915) >> -{ >> -/* open-coded kstat_irqs() */ >> -struct irq_desc *desc = irq_to_desc(i915->drm.pdev->irq); >> -u64 sum = 0; >> -int cpu; >> - >> -if (!desc || !desc->kstat_irqs) >> -return 0; >> - >> -for_each_possible_cpu(cpu) >> -sum += *per_cpu_ptr(desc->kstat_irqs, cpu); >> - >> -return sum; >> -} > > May I ask why this has been merged in the first place? > > Nothing in a driver has ever to fiddle with the internals of an irq > descriptor. We have functions for properly accessing them. Just because > C allows to fiddle with everything is not a justification. If the > required function is not exported then adding the export with a proper > explanation is not asked too much. > > Also this lacks protection or at least a comment why this can be called > safely and is not subject to a concurrent removal of the irq descriptor. > The same problem exists when calling kstat_irqs(). It's even documented > at the top of the function. > > Thanks, > > tglx I don't know the history behind this bit. I stumbled across it in cscope when looking for places using kstat_irqs. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 05/13] sh: Fix set but not used warnings with !CONFIG_MMU
commit aa1f4345b5480502a4e61addf5c59d606fdbce8f Author: Sam Ravnborg Date: Mon Nov 30 22:09:29 2020 +0100 sh: Fix set but not used warnings with !CONFIG_MMU Building fbdev drivers for sh with W=1 produces the following warning: tmiofb.c: In function ‘tmiofb_remove’: tmiofb.c:805:21: warning: variable ‘par’ set but not used This is with allmodconfig and ARCH=sh This boiled down to iounmap() defined as empty for !CONFIG_MMU. Fix this by by adding "(void)addr;" to tell the compiler the argument to iounmap() should be considered used. v4: - Fix build error of ethernet driver (kernel test robot) Added missing () around macro parameter Signed-off-by: Sam Ravnborg Cc: kernel test robot Cc: Thomas Zimmermann Cc: Lee Jones Cc: Rich Felker Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Mike Rapoport Cc: Kuninori Morimoto Cc: Peter Zijlstra Cc: Sam Ravnborg Cc: Andrew Morton diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 6d5c6463bc07..45082bcbd9aa 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -271,7 +271,7 @@ static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, #endif /* CONFIG_HAVE_IOREMAP_PROT */ #else /* CONFIG_MMU */ -#define iounmap(addr) do { } while (0) +#define iounmap(addr) do { (void)(addr); } while (0) #define ioremap(offset, size) ((void __iomem *)(unsigned long)(offset)) #endif /* CONFIG_MMU */ ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v3 05/13] sh: Fix set but not used warnings with !CONFIG_MMU
Hi "kernel test robot" On Sun, Dec 06, 2020 at 10:48:14PM +0100, Sam Ravnborg wrote: > commit aa1f4345b5480502a4e61addf5c59d606fdbce8f > Author: Sam Ravnborg > Date: Mon Nov 30 22:09:29 2020 +0100 > > sh: Fix set but not used warnings with !CONFIG_MMU > > Building fbdev drivers for sh with W=1 produces the following warning: > > tmiofb.c: In function ‘tmiofb_remove’: > tmiofb.c:805:21: warning: variable ‘par’ set but not used > > This is with allmodconfig and ARCH=sh > > This boiled down to iounmap() defined as empty for !CONFIG_MMU. > Fix this by by adding "(void)addr;" to tell the compiler the > argument to iounmap() should be considered used. > > v4: > - Fix build error of ethernet driver (kernel test robot) > Added missing () around macro parameter Thanks for thee quick report - it was easy to reproduce. I hope this is enough for the robot to pick up the updated patch. Sam ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 210517] nouveau: DRM: failed to map fb: -28 (GeForce 6600 LE, ppc64)
https://bugzilla.kernel.org/show_bug.cgi?id=210517 --- Comment #5 from Erhard F. (erhar...@mailbox.org) --- (In reply to Dave Airlie from comment #4) > The fix for this is in Linus' tree already > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/ > drivers/gpu/drm/nouveau?id=aea656b0d05ec5b8ed5beb2f94c4dd42ea834e9d This patch solves the problem, thanks! -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v11 09/10] PM / devfreq: tegra30: Support interconnect and OPPs from device-tree
On 12/4/20 4:24 AM, Dmitry Osipenko wrote: > This patch moves ACTMON driver away from generating OPP table by itself, > transitioning it to use the table which comes from device-tree. This > change breaks compatibility with older device-trees and brings support > for the interconnect framework to the driver. This is a mandatory change > which needs to be done in order to implement interconnect-based memory > DVFS, i.e. device-trees need to be updated. Now ACTMON issues a memory > bandwidth requests using dev_pm_opp_set_bw() instead of driving EMC clock > rate directly. > > Tested-by: Peter Geis > Tested-by: Nicolas Chauvet > Acked-by: Chanwoo Choi > Signed-off-by: Dmitry Osipenko > --- > drivers/devfreq/tegra30-devfreq.c | 79 +++ > 1 file changed, 37 insertions(+), 42 deletions(-) > > diff --git a/drivers/devfreq/tegra30-devfreq.c > b/drivers/devfreq/tegra30-devfreq.c > index 38cc0d014738..145ef91ae092 100644 > --- a/drivers/devfreq/tegra30-devfreq.c > +++ b/drivers/devfreq/tegra30-devfreq.c > @@ -19,6 +19,8 @@ > #include > #include > > +#include > + > #include "governor.h" > > #define ACTMON_GLB_STATUS0x0 > @@ -155,6 +157,7 @@ struct tegra_devfreq_device { > > struct tegra_devfreq { > struct devfreq *devfreq; > + struct opp_table*opp_table; > > struct reset_control*reset; > struct clk *clock; > @@ -612,34 +615,19 @@ static void tegra_actmon_stop(struct tegra_devfreq > *tegra) > static int tegra_devfreq_target(struct device *dev, unsigned long *freq, > u32 flags) > { > - struct tegra_devfreq *tegra = dev_get_drvdata(dev); > - struct devfreq *devfreq = tegra->devfreq; > struct dev_pm_opp *opp; > - unsigned long rate; > - int err; > + int ret; > > opp = devfreq_recommended_opp(dev, freq, flags); > if (IS_ERR(opp)) { > dev_err(dev, "Failed to find opp for %lu Hz\n", *freq); > return PTR_ERR(opp); > } > - rate = dev_pm_opp_get_freq(opp); > - dev_pm_opp_put(opp); > - > - err = clk_set_min_rate(tegra->emc_clock, rate * KHZ); > - if (err) > - return err; > - > - err = clk_set_rate(tegra->emc_clock, 0); > - if (err) > - goto restore_min_rate; > > - return 0; > - > -restore_min_rate: > - clk_set_min_rate(tegra->emc_clock, devfreq->previous_freq); > + ret = dev_pm_opp_set_bw(dev, opp); > + dev_pm_opp_put(opp); > > - return err; > + return ret; > } > > static int tegra_devfreq_get_dev_status(struct device *dev, > @@ -655,7 +643,7 @@ static int tegra_devfreq_get_dev_status(struct device > *dev, > stat->private_data = tegra; > > /* The below are to be used by the other governors */ > - stat->current_frequency = cur_freq; > + stat->current_frequency = cur_freq * KHZ; > > actmon_dev = &tegra->devices[MCALL]; > > @@ -705,7 +693,12 @@ static int tegra_governor_get_target(struct devfreq > *devfreq, > target_freq = max(target_freq, dev->target_freq); > } > > - *freq = target_freq; > + /* > + * tegra-devfreq driver operates with KHz units, while OPP table > + * entries use Hz units. Hence we need to convert the units for the > + * devfreq core. > + */ > + *freq = target_freq * KHZ; > > return 0; > } > @@ -774,6 +767,7 @@ static struct devfreq_governor tegra_devfreq_governor = { > > static int tegra_devfreq_probe(struct platform_device *pdev) > { > + u32 hw_version = BIT(tegra_sku_info.soc_speedo_id); > struct tegra_devfreq_device *dev; > struct tegra_devfreq *tegra; > struct devfreq *devfreq; > @@ -822,11 +816,25 @@ static int tegra_devfreq_probe(struct platform_device > *pdev) > return err; > } > > + tegra->opp_table = dev_pm_opp_set_supported_hw(&pdev->dev, > +&hw_version, 1); > + err = PTR_ERR_OR_ZERO(tegra->opp_table); > + if (err) { > + dev_err(&pdev->dev, "Failed to set supported HW: %d\n", err); > + return err; > + } > + > + err = dev_pm_opp_of_add_table(&pdev->dev); > + if (err) { > + dev_err(&pdev->dev, "Failed to add OPP table: %d\n", err); > + goto put_hw; > + } > + > err = clk_prepare_enable(tegra->clock); > if (err) { > dev_err(&pdev->dev, > "Failed to prepare and enable ACTMON clock\n"); > - return err; > + goto remove_table; > } > > err = reset_control_reset(tegra->reset); > @@ -850,23 +858,6 @@ static int tegra_devfreq_probe(struct platform_device > *pdev) > dev->regs = tegra->regs + dev->config->offset; > } > > - for (rate = 0; rate <= tegra->max_freq * KHZ; rate++) { > - rate = clk_round_rat
Re: [PATCH v11 10/10] PM / devfreq: tegra30: Separate configurations per-SoC generation
On 12/4/20 4:24 AM, Dmitry Osipenko wrote: > Previously we were using count-weight of the T124 for T30 in order to > get EMC clock rate that was reasonable for T30. In fact the count-weight > should be x2 times smaller on T30, but then devfreq was producing a bit > too low EMC clock rate for ISO memory clients, like display controller > for example. > > Now both Tegra ACTMON and Tegra DRM display drivers support interconnect > framework and display driver tells to ICC what a minimum memory bandwidth > is needed, preventing FIFO underflows. Thus, now we can use a proper > count-weight value for Tegra30 and MC_ALL device config needs a bit more > aggressive boosting. > > Add a separate ACTMON driver configuration that is specific to Tegra30. > > Tested-by: Peter Geis > Tested-by: Nicolas Chauvet > Acked-by: Chanwoo Choi > Signed-off-by: Dmitry Osipenko > --- > drivers/devfreq/tegra30-devfreq.c | 68 --- > 1 file changed, 54 insertions(+), 14 deletions(-) > > diff --git a/drivers/devfreq/tegra30-devfreq.c > b/drivers/devfreq/tegra30-devfreq.c > index 145ef91ae092..117cad7968ab 100644 > --- a/drivers/devfreq/tegra30-devfreq.c > +++ b/drivers/devfreq/tegra30-devfreq.c > @@ -57,13 +57,6 @@ > #define ACTMON_BELOW_WMARK_WINDOW3 > #define ACTMON_BOOST_FREQ_STEP 16000 > > -/* > - * Activity counter is incremented every 256 memory transactions, and each > - * transaction takes 4 EMC clocks for Tegra124; So the COUNT_WEIGHT is > - * 4 * 256 = 1024. > - */ > -#define ACTMON_COUNT_WEIGHT 0x400 > - > /* > * ACTMON_AVERAGE_WINDOW_LOG2: default value for @DEV_CTRL_K_VAL, which > * translates to 2 ^ (K_VAL + 1). ex: 2 ^ (6 + 1) = 128 > @@ -111,7 +104,7 @@ enum tegra_actmon_device { > MCCPU, > }; > > -static const struct tegra_devfreq_device_config actmon_device_configs[] = { > +static const struct tegra_devfreq_device_config tegra124_device_configs[] = { > { > /* MCALL: All memory accesses (including from the CPUs) */ > .offset = 0x1c0, > @@ -133,6 +126,28 @@ static const struct tegra_devfreq_device_config > actmon_device_configs[] = { > }, > }; > > +static const struct tegra_devfreq_device_config tegra30_device_configs[] = { > + { > + /* MCALL: All memory accesses (including from the CPUs) */ > + .offset = 0x1c0, > + .irq_mask = 1 << 26, > + .boost_up_coeff = 200, > + .boost_down_coeff = 50, > + .boost_up_threshold = 20, > + .boost_down_threshold = 10, > + }, > + { > + /* MCCPU: memory accesses from the CPUs */ > + .offset = 0x200, > + .irq_mask = 1 << 25, > + .boost_up_coeff = 800, > + .boost_down_coeff = 40, > + .boost_up_threshold = 27, > + .boost_down_threshold = 10, > + .avg_dependency_threshold = 16000, /* 16MHz in kHz units */ > + }, > +}; > + > /** > * struct tegra_devfreq_device - state specific to an ACTMON device > * > @@ -155,6 +170,12 @@ struct tegra_devfreq_device { > unsigned long target_freq; > }; > > +struct tegra_devfreq_soc_data { > + const struct tegra_devfreq_device_config *configs; > + /* Weight value for count measurements */ > + unsigned int count_weight; > +}; > + > struct tegra_devfreq { > struct devfreq *devfreq; > struct opp_table*opp_table; > @@ -171,11 +192,13 @@ struct tegra_devfreq { > struct delayed_work cpufreq_update_work; > struct notifier_block cpu_rate_change_nb; > > - struct tegra_devfreq_device devices[ARRAY_SIZE(actmon_device_configs)]; > + struct tegra_devfreq_device devices[2]; > > unsigned intirq; > > boolstarted; > + > + const struct tegra_devfreq_soc_data *soc; > }; > > struct tegra_actmon_emc_ratio { > @@ -488,7 +511,7 @@ static void tegra_actmon_configure_device(struct > tegra_devfreq *tegra, > tegra_devfreq_update_avg_wmark(tegra, dev); > tegra_devfreq_update_wmark(tegra, dev); > > - device_writel(dev, ACTMON_COUNT_WEIGHT, ACTMON_DEV_COUNT_WEIGHT); > + device_writel(dev, tegra->soc->count_weight, ACTMON_DEV_COUNT_WEIGHT); > device_writel(dev, ACTMON_INTR_STATUS_CLEAR, ACTMON_DEV_INTR_STATUS); > > val |= ACTMON_DEV_CTRL_ENB_PERIODIC; > @@ -779,6 +802,8 @@ static int tegra_devfreq_probe(struct platform_device > *pdev) > if (!tegra) > return -ENOMEM; > > + tegra->soc = of_device_get_match_data(&pdev->dev); > + > tegra->regs = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(tegra->regs)) > return PTR_ERR(tegra->regs); > @@ -852,9 +877,9 @@ static int tegra_devfreq_probe(struct platform_device > *pdev) > > tegra->max_freq = rate / KHZ; > > - for