aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/aty/radeon_pm.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-04-04video: fbdev: aty/matrox/...: Prepare cleanup of powerpc's asm/prom.hChristophe Leroy1-1/+0
powerpc's asm/prom.h brings some headers that it doesn't need itself. In order to clean it up, first add missing headers in users of asm/prom.h Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Helge Deller <deller@gmx.de>
2020-09-08fbdev: radeonfb: use generic power managementVaibhav Gupta1-8/+28
Drivers using legacy PCI power management .suspend()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Cc: Bjorn Helgaas <helgaas@kernel.org> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Bjorn Helgaas <bjorn@helgaas.com> Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Cc: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200907070221.29938-3-vaibhavgupta40@gmail.com
2020-09-08video: fbdev: aty: radeon_pm: remove redundant CONFIG_PM containerVaibhav Gupta1-2/+0
Fixes commit 42ddb453a0cd ("radeon: Conditionally compile PM code") Before the above mentioned patch, codes between the line number 547 and 2803 were already inside "#ifdef CONFIG_PM" container. Thus, addition of "#if defined(CONFIG_PM)" was not required in the patch. It also affected the "#ifdef CONFIG_PPC_OF" container (line 1943-2510). From the current snapshot of radeon_pm.c, remove: 1434 | #if defined(CONFIG_PM) and, 2213 | #endif This removes the redundant CONFIG_PM directive as well as fixes the CONFIG_PPC (earlier CONFIG_PPC_OF) container. Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Cc: Bjorn Helgaas <helgaas@kernel.org> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Bjorn Helgaas <bjorn@helgaas.com> Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Cc: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200907070221.29938-2-vaibhavgupta40@gmail.com
2020-08-03fbdev: Use fallthrough pseudo-keywordGustavo A. R. Silva1-3/+3
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200707210539.GA12530@embeddedor
2019-11-20PCI/PM: Avoid exporting __pci_complete_power_transition()Rafael J. Wysocki1-1/+1
Notice that radeon_set_suspend(), which is the only caller of __pci_complete_power_transition() outside of pci.c, really only cares about the pci_platform_power_transition() invoked by it, so export the latter instead of it, update the radeon driver to call pci_platform_power_transition() directly and make __pci_complete_power_transition() static. Code rearrangement, no intentional functional impact. Link: https://lore.kernel.org/r/1731661.ykamz2Tiuf@kreacher Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
2019-02-08fbdev: Use of_node_name_eq for node name comparisonsRob Herring1-3/+3
Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which omap is. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2018-04-24video: fbdev: aty: radeon_pm: Replace mdelay with msleep in radeonfb_pci_suspendJia-Ju Bai1-4/+4
radeonfb_pci_suspend() is never called in atomic context. radeonfb_pci_suspend() is only set as ".suspend" in struct pci_driver. This function is not called in atomic context. Despite never getting called from atomic context, radeonfb_pci_suspend() calls mdelay() to busily wait. This is not necessary and can be replaced with msleep() and usleep_range() to avoid busy waiting. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-20Merge tag 'fbdev-v4.15' of git://github.com/bzolnier/linuxLinus Torvalds1-0/+3
Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here (though removal of the dead igafb driver stands out in diffstat). Summary: - convert timers to use timer_setup() (Kees Cook, Thierry Reding) - fix panels support on iMX boards in mxsfb driver (Stefan Agner) - fix timeout on EDID read in udlfb driver (Ladislav Michl) - add missing modes to fix out of bounds access in controlfb driver (Geert Uytterhoeven) - update initialisation paths in sa1100fb driver to be more robust (Russell King) - fix error handling path of ->probe method in au1200fb driver (Christophe JAILLET) - fix handling of cases when either panel or crt is defined in sm501fb driver (Sudip Mukherjee, Colin Ian King) - add ability to the Goldfish FB driver to be recognized by OS via DT (Aleksandar Markovic) - structures constifications (Bhumika Goyal) - misc fixes (Allen Pais, Gustavo A. R. Silva, Dan Carpenter) - misc cleanups (Colin Ian King, Himanshu Jha, Markus Elfring) - remove dead igafb driver" * tag 'fbdev-v4.15' of git://github.com/bzolnier/linux: (42 commits) OMAPFB: prevent buffer underflow in omapfb_parse_vram_param() video: fbdev: sm501fb: fix potential null pointer dereference on fbi fbcon: Initialize ops->info early video: fbdev: Convert timers to use timer_setup() video: fbdev: pxa3xx_gcu: Convert timers to use timer_setup() fbdev: controlfb: Add missing modes to fix out of bounds access video: fbdev: sis_main: mark expected switch fall-throughs video: fbdev: cirrusfb: mark expected switch fall-throughs video: fbdev: aty: radeon_pm: mark expected switch fall-throughs video: fbdev: sm501fb: mark expected switch fall-through in sm501fb_blank_crt video: fbdev: intelfb: remove redundant variables video/fbdev/dnfb: Use common error handling code in dnfb_probe() sm501fb: suspend and resume fb if it exists sm501fb: unregister framebuffer only if registered sm501fb: deallocate colormap only if allocated video: goldfishfb: Add support for device tree bindings Documentation: Add device tree binding for Goldfish FB driver video: udlfb: Fix read EDID timeout video: fbdev: remove dead igafb driver video: fbdev: mxsfb: fix pixelclock polarity ...
2017-11-09video: fbdev: aty: radeon_pm: mark expected switch fall-throughsGustavo A. R. Silva1-0/+3
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-17fbdev: radeon: replace PPC_OF with PPCKevin Hao1-8/+8
The PPC_OF is a ppc specific option which is used to mean that the firmware device tree access functions are available. Since all the ppc platforms have a device tree, it is aways set to 'y' for ppc. So it makes no sense to keep a such option in the current kernel. Replace it with PPC. Signed-off-by: Kevin Hao <haokexin@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-04-17video: move fbdev to drivers/video/fbdevTomi Valkeinen1-0/+2906
The drivers/video directory is a mess. It contains generic video related files, directories for backlight, console, linux logo, lots of fbdev device drivers, fbdev framework files. Make some order into the chaos by creating drivers/video/fbdev directory, and move all fbdev related files there. No functionality is changed, although I guess it is possible that some subtle Makefile build order related issue could be created by this patch. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>