1. 18 5月, 2018 1 次提交
  2. 02 2月, 2018 3 次提交
    • L
      drm/nouveau: Add support for SLCG for Kepler2 · a0f79082
      Lyude Paul 提交于
      That's right, there's still more power saving to go! Starting with
      kepler 2, nvidia hardware has an additional level of clockgating known
      as second level clockgating.  The details of this are not exact, but it
      seems to work by waiting for a collection of dependent hardware blocks
      to be gated before taking affect. As with the previous series, this
      results in another noticeable drop in power consumption and is
      programmed in the same manner.
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NMartin Peres <martin.peres@free.fr>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      a0f79082
    • L
      drm/nouveau: Add support for BLCG on Kepler2 · 7d094d29
      Lyude Paul 提交于
      Same as the previous patch, but for Kepler2 now
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NMartin Peres <martin.peres@free.fr>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      7d094d29
    • L
      drm/nouveau: Add support for BLCG on Kepler1 · 1bab09ac
      Lyude Paul 提交于
      This enables BLCG optimization for kepler1. When using clockgating,
      nvidia's firmware has a set of registers which are initially programmed
      by the vbios with various engine delays and other mysterious settings
      that are safe enough to bring up the GPU. However, the values used by
      the vbios are more power hungry then they need to be, so the nvidia driver
      writes it's own more optimized set of BLCG settings before enabling
      CG_CTRL. This adds support for programming the optimized BLCG values
      during engine/subdev init, which enables rather significant power
      savings.
      
      This introduces the nvkm_therm_clkgate_init() helper, which we use to
      program the optimized BLCG settings before enabling clockgating with
      nvkm_therm_clkgate_enable.
      
      As well, this commit shares a lot more code with Fermi since BLCG is
      mostly the same there as far as we can tell. In the future, it's likely
      we'll reformat the clkgate_packs for kepler1 so that they share a list
      of mmio packs with Fermi.
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NMartin Peres <martin.peres@free.fr>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      1bab09ac
  3. 02 11月, 2017 10 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      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: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
    • B
      46bda4f4
    • B
      drm/nouveau/gr/gf100-: replace hardcoded instance/vmm setup in grctx generation · 2cabefcb
      Ben Skeggs 提交于
      Could be useful for if/when a future GPU removes support for the GF100
      PT layout.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      2cabefcb
    • B
      019e4d76
    • B
      drm/nouveau/fifo: initialise vmm with new interfaces · f66c57d9
      Ben Skeggs 提交于
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      f66c57d9
    • B
      drm/nouveau/core/memory: add reference counting · 997a8900
      Ben Skeggs 提交于
      We need to be able to prevent memory from being freed while it's still
      mapped in a GPU's address-space.
      
      Will be used by upcoming MMU changes.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      997a8900
    • B
      drm/nouveau/core/memory: change map interface to support upcoming mmu changes · 19a82e49
      Ben Skeggs 提交于
      Map flags (access, kind, etc) are currently defined in either the VMA,
      or the memory object, which turns out to not be ideal for things like
      suballocated buffers, etc.
      
      These will become per-map flags instead, so we need to support passing
      these arguments in nvkm_memory_map().
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      19a82e49
    • B
      b6838c14
    • B
    • B
      drm/nouveau/core/device: remove object include to prevent unnecessary rebuilds · 4246b92c
      Ben Skeggs 提交于
      nvkm_device hasn't subclassed nvkm_object in a long time.
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      4246b92c
  4. 06 4月, 2017 3 次提交
  5. 07 3月, 2017 2 次提交
  6. 17 2月, 2017 7 次提交
  7. 13 12月, 2016 3 次提交
  8. 07 11月, 2016 4 次提交
    • A
      drm/nouveau/gr: fallback to legacy paths during firmware lookup · e137040e
      Alexandre Courbot 提交于
      Look for firmware files using the legacy ("nouveau/nvxx_fucxxxx") path
      if they cannot be found in the new, "official" path. User setups were
      broken by the switch, which is bad.
      
      There are only 4 firmware files we may want to look up that way, so
      hardcode them into the lookup function. All new firmware files should
      use the standard "nvidia/<chip>/gr/" path.
      
      Fixes: 8539b37a ("drm/nouveau/gr: use NVIDIA-provided external firmwares")
      Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Cc: stable@vger.kernel.org
      e137040e
    • B
    • B
      drm/nouveau: mark symbols static where possible · e08a1d97
      Baoyou Xie 提交于
      We get a few warnings when building kernel with W=1:
      drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c:29:1: warning: no previous prototype for 'nvbios_fan_table' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c:56:1: warning: no previous prototype for 'nvbios_fan_entry' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c:184:1: warning: no previous prototype for 'gt215_clk_info' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:99:1: warning: no previous prototype for 'gt215_link_train_calc' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:153:1: warning: no previous prototype for 'gt215_link_train' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:271:1: warning: no previous prototype for 'gt215_link_train_init' [-Wmissing-prototypes]
      ....
      
      In fact, both functions are only used in the file in which they are
      declared and don't need a declaration, but can be made static.
      So this patch marks these functions with 'static'.
      Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      e08a1d97
    • B
      drm/nouveau: add missing header dependencies · e8390eb2
      Baoyou Xie 提交于
      We get a few warnings when building kernel with W=1:
      drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous prototype for 'nvkm_firmware_get' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous prototype for 'nvkm_firmware_put' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr3.c:69:1: warning: no previous prototype for 'nvkm_sddr3_calc' [-Wmissing-prototypes]
      drivers/gpu/drm/nouveau/nvkm/subdev/fb/sddr2.c:60:1: warning: no previous prototype for 'nvkm_sddr2_calc' [-Wmissing-prototypes]
      ....
      
      In fact, these functions are declared in
      drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h
      drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.h
      drivers/gpu/drm/nouveau/nvkm/subdev/volt/priv.h
      drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.h
      drivers/gpu/drm/nouveau/dispnv04/disp.h.
      So this patch adds missing header dependencies.
      Signed-off-by: NBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      e8390eb2
  9. 12 10月, 2016 1 次提交
  10. 30 7月, 2016 1 次提交
  11. 14 7月, 2016 4 次提交
  12. 02 6月, 2016 1 次提交