summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/pm/nv50: fix wrong addr for ZCULL source on G80:GT215Samuel Pitoiset2015-08-281-1/+1
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: add opcodes 0x73 and 0x77Ilia Mirkin2015-08-281-0/+37
| | | | | | | | No known VBIOSes use these, but they are present in the actual VBIOS table parsing logic. No harm in adding these too. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/platform: recognize GM20BAlexandre Courbot2015-08-281-0/+1
| | | | | | | Allow the platform driver to recognize GM20B. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: recognize GM20BAlexandre Courbot2015-08-281-0/+20
| | | | | | | Recognize GM20B and assign the right engines and subdevs. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr: add GM20B supportAlexandre Courbot2015-08-2810-6/+217
| | | | | | | | | Add support for GM20B's graphics engine, based on GK20A. Note that this code alone will not allow the engine to initialize on released devices which require PMU-assisted secure boot. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: add GM20B fifoAlexandre Courbot2015-08-285-1/+41
| | | | | | | GM20B has a 512-channels FIFO similar to GK104. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gk20a: use same initialization sequence as nvgpuAlexandre Courbot2015-08-285-30/+421
| | | | | | | | | | | | | GK20A's initialization was based on GK104, but differences exist in the way the initial context is built and the initialization process itself. This patch follows the same initialization sequence as nvgpu performs to avoid bad surprises. Since the register bundles initialization also differ considerably from GK104, the register packs are now loaded from firmware files, again similarly to what is done with nvgpu. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr: use NVIDIA-provided external firmwaresAlexandre Courbot2015-08-281-12/+19
| | | | | | | | | NVIDIA will officially start providing GR firmwares through linux-firmware for GPUs that require it. Change the GR firmware lookup function to use these files. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm/gk104: add compute signals/sourcesSamuel Pitoiset2015-08-283-1/+93
| | | | | | | | | These signals and sources have been reverse engineered from CUPTI (Linux). Graphics signals exposed by PerfKit (Windows only) will be added later. I need to reverse engineer them and it's a bit painful. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm/gk104: re-use gf100_pm_ctor()Samuel Pitoiset2015-08-283-56/+14
| | | | | | | gk104_pm_ctor() is equal to gf100_pm_ctor(). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm/nv40: rename pcounter domains to 'pc' instead of 'pm'Samuel Pitoiset2015-08-281-1/+1
| | | | | | | | This trivial patch makes thing more consistent since hardware signals names are prefixed by 'pcXX'. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: expose name of domainsSamuel Pitoiset2015-08-282-0/+2
| | | | | | | | This is going to be very useful for GF100+ because each GPC can have its own domain of counters. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/drm/nouveau/clk: fix tstate to pstate calculationWei Ni2015-08-281-1/+1
| | | | | | | | | | | | | According to the tstate calculation in nvkm_clk_tstate(), the range of tstate is from -(clk->state_nr - 1) to 0, it mean the tstate is negative value. But in nvkm_pstate_work(), it use (clk->state_nr - 1 - clk->tstate) to limit pstate, it's not correct. This patch fix it to use (clk->state_nr - 1 + clk->tstate) to limit pstate. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: some fixes related to sourcesSamuel Pitoiset2015-08-281-5/+16
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: fix signals/sources for GT200+Samuel Pitoiset2015-08-282-6/+5
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm/gf100: add compute signals/sourcesSamuel Pitoiset2015-08-287-5/+282
| | | | | | | | | | | These signals and sources have been reverse engineered from CUPTI (Linux). Graphics signals exposed by PerfKit (Windows only) will be added later. I need to reverse engineer them and it's a bit painful. This commit also adds a new class for GF108 and GF117. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm/gf100: allow to share GPC, HUB and PART domainsSamuel Pitoiset2015-08-284-19/+34
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: stack perfdom class under perfmonBen Skeggs2015-08-281-7/+31
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: swap perfmon/perfdom code to avoid forward decl in next commitBen Skeggs2015-08-281-175/+175
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm/nv50: add compute and graphics signals/sourcesSamuel Pitoiset2015-08-288-11/+485
| | | | | | | | | | | These signals and sources have been reverse engineered from NVIDIA PerfKit (Windows) and CUPTI (Linux), they will be used to build complex hardware events from the userspace. This commit also adds a new class for GT200. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: allow the userspace to configure sourcesSamuel Pitoiset2015-08-283-10/+95
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: allow to configure domains instead of simple countersSamuel Pitoiset2015-08-286-124/+146
| | | | | | | | | | | | | | | | | | | Configuring counters from the userspace require the kernel to handle some logic related to performance counters. Basically, it has to find a free slot to assign a counter, to handle extra counting modes like B4/B6 and it must return and error when it can't configure a counter. In my opinion, the kernel should not handle all of that logic but it should only write the configuration sent by the userspace without checking anything. In other words, it should overwrite the configuration even if it's already counting and do not return any errors. This patch allows the userspace to configure a domain instead of separate counters. This has the advantage to move all of the logic to the userspace. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: allow the userspace to schedule hardware countersSamuel Pitoiset2015-08-283-25/+48
| | | | | | | | | | | | | This adds a new method NVIF_PERFCTR_V0_INIT which starts a batch of hardware counters for sampling. This will allow the userspace to start a monitoring session using the INIT method and to stop it with SAMPLE, for example before and after a frame is rendered. This commit temporarily breaks nv_perfmon but this is going to be fixed with the upcoming patch. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: implement NVIF_PERFMON_V0_QUERY_SOURCE methodSamuel Pitoiset2015-08-282-0/+89
| | | | | | | | This allows to query the ID, the mask and the user-readable name of sources for each signal. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: allow to query the number of sources for a signalSamuel Pitoiset2015-08-282-4/+21
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: add concept of sourcesSamuel Pitoiset2015-08-283-4/+103
| | | | | | | | | | | | | A source (or multiplexer) is a tuple addr+mask+shift which allows to control a block of signals. The maximum number of sources that a signal can define is arbitrary limited to 8 and this should be large enough. This patch allows to define multi-level of sources for a signal. Each different sources are stored to a global list and will be exposed to the userspace through the nvif interface in order to avoid conflicts. Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: allow to monitor hardware signal index 0x00Samuel Pitoiset2015-08-283-6/+10
| | | | | | | | | This signal index must be always allowed even if it's not clearly defined in a domain in order to monitor a counter like 0x03020100 because it's the default value of signals. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: use hardware signals indexes instead of user-readable namesSamuel Pitoiset2015-08-282-44/+19
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: change signal iter to u16Samuel Pitoiset2015-08-283-9/+10
| | | | | | | | 16 bits is large enough to store the maximum number of signals available for one domain (i.e. 256). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: allow to query signals by domainSamuel Pitoiset2015-08-282-25/+14
| | | | | | | | This will allow to configure performance counters with hardware signal indexes instead of user-readable names in an upcoming patch. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: implement NVIF_PERFMON_V0_QUERY_DOMAIN methodSamuel Pitoiset2015-08-282-1/+96
| | | | | | | | This allows to query the number of available domains, including the number of hardware counter and the number of signals per domain. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: prevent creating a perfctr object when signals are not foundSamuel Pitoiset2015-08-281-2/+4
| | | | | | | | Since a new class has been introduced to query signals, we can now return an error when the userspace wants to monitor unknown signals. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: reorganize the nvif interfaceSamuel Pitoiset2015-08-283-18/+51
| | | | | | | | | This commit introduces the NVIF_IOCTL_NEW_V0_PERFMON class which will be used in order to query domains, signals and sources. This separates the querying and the counting interface. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: remove unused nvkm_perfsig_wrap() functionSamuel Pitoiset2015-08-282-24/+0
| | | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: remove pmu signalsSamuel Pitoiset2015-08-288-151/+1
| | | | | | | | PDAEMON signals don't have to be exposed by the perfmon engine. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk/nv50: Enable user reclocking for NVA0Roy Spliet2015-08-281-1/+2
| | | | | | | | Tested on a few cards. Probably works quite well for most, given they should all be GDDR3. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/gddr3: Add a few CL and WR entries observed on GTX260Roy Spliet2015-08-281-4/+4
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/ramnv50: GDDR3 script for NVA0Roy Spliet2015-08-281-25/+104
| | | | | | | | | This looks surprisingly similar to scripts on earlier cards as well but they don't seem to work just yet. That... and I don't have any, which makes it a tough job to reverse engineer. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/ramcfg: Separate out RON pull valueRoy Spliet2015-08-284-3/+9
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/rammap: Parse perf mode as if it's a rammap entryRoy Spliet2015-08-284-0/+24
| | | | | | | Some of the bits in there are similar to the bits in the gt215 rammap. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/ramnv50: Ressurect timing code, use proper timing/rammap handlersRoy Spliet2015-08-284-33/+182
| | | | | | | Might need some generalisation to < GT200. For those: use at your own risk! Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/ramgt215: No need to cuss like thatRoy Spliet2015-08-281-1/+1
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/ramnv50: Make 0x100da0 per-partitionRoy Spliet2015-08-281-7/+13
| | | | | | | Like on GT215 Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/rammap: Pull DLLoff bit out of version 0x10 structRoy Spliet2015-08-286-8/+8
| | | | | | | In preparation of NV50 reclocking, where there is no version Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* remove unnecessary includeBen Skeggs2015-08-281-30/+0
| | | | | | | This was merged with core/device.h in an earlier commit, but somehow never got removed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm ↵Dave Airlie2015-08-273-174/+226
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next Here are some development updates for the Synopsis Designware HDMI driver, which clean up some of the code, and start preparing to add audio support to the driver. This series of patches are based on a couple of dependent commits from the ALSA tree. Briefly, the updates are: - move comments which should have moved with the phy values to the IMX part of the driver. - clean up the phy configuration: to all lookups before starting to program the phy. - clean up the HDMI clock regenerator code - use the drm_hdmi_avi_infoframe_from_display_mode() helper which allows the code to be subsequently simplified - remove the unused 'regmap' pointer in struct dw_hdmi - use the bridge drm device rather than the connector (we're the bridge code) - remove private hsync/vsync/interlaced flags, getting them from the DRM mode structure instead. - implement interface functions to support audio - setting the audio sample rate, and enabling the audio clocks. - removal of broken pixel repetition support - cleanup DVI vs HDMI sink handling - enable audio only if connected device supports audio - avoid double-enabling bridge in the sink path (once in mode_set, and again in commit) - rename mis-named dw_hdmi_phy_enable_power() - fix bridge enable/disable handing, so a plug-in event doesn't reconfigure the bridge if DRM has disabled the output - fix from Vladimir Zapolskiy for the I2CM_ADDRESS macro name These are primerily preparitory patches for the AHB audio driver and the I2S audio driver (from Rockchip) for this IP. * 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: drm: bridge/dw_hdmi: fix register I2CM_ADDRESS register name drm: bridge/dw_hdmi: fix phy enable/disable handling drm: bridge/dw_hdmi: rename dw_hdmi_phy_enable_power() drm: bridge/dw_hdmi: avoid enabling interface in mode_set drm: bridge/dw_hdmi: enable audio only if sink supports audio drm: bridge/dw_hdmi: clean up HDMI vs DVI mode handling drm: bridge/dw_hdmi: don't support any pixel doubled modes drm: bridge/dw_hdmi: remove pixel repetition setting for all VICs drm: bridge/dw_hdmi: introduce interfaces to enable and disable audio drm: bridge/dw_hdmi: introduce interface to setting sample rate drm: bridge/dw_hdmi: remove mhsyncpolarity/mvsyncpolarity/minterlaced drm: bridge/dw_hdmi: use our own drm_device drm: bridge/dw_hdmi: remove unused 'regmap' struct member drm: bridge/dw_hdmi: simplify hdmi_config_AVI() a little drm: bridge/dw_hdmi: use drm_hdmi_avi_infoframe_from_display_mode() drm: bridge/dw_hdmi: clean up hdmi_set_clk_regenerator() drm: bridge/dw_hdmi: clean up phy configuration drm: imx/dw_hdmi: move phy comments drm/edid: add function to help find SADs
| * drm: bridge/dw_hdmi: fix register I2CM_ADDRESS register nameVladimir Zapolskiy2015-08-181-4/+4
| | | | | | | | | | | | | | | | I2CM_ADDRESS became a MESS, fix it, also change guarding define to __DW_HDMI_H__ , since the driver is not IMX specific. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: fix phy enable/disable handlingRussell King2015-08-181-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dw_hdmi enable/disable handling is particularly weak in several regards: * The hotplug interrupt could call hdmi_poweron() or hdmi_poweroff() while DRM is setting a mode, which could race with a mode being set. * Hotplug will always re-enable the phy whenever it detects an active hotplug signal, even if DRM has disabled the output. Resolve all of these by introducing a mutex to prevent races, and a state-tracking bool so we know whether DRM wishes the output to be enabled. We choose to use our own mutex rather than ->struct_mutex so that we can still process interrupts in a timely fashion. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: rename dw_hdmi_phy_enable_power()Russell King2015-08-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dw_hdmi_phy_enable_power() is not about enabling and disabling power. It is about allowing or preventing power-down mode being entered - the register is documented as "Power-down enable (active low 0b)." This can be seen as the bit has no effect when the HDMI phy is operational on iMX6 hardware. Rename the function to dw_hdmi_phy_enable_powerdown() to reflect the documentation, make it take a bool for the 'enable' argument, and invert the value to be written. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * drm: bridge/dw_hdmi: avoid enabling interface in mode_setRussell King2015-08-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a mode set, DRM makes the following sequence of calls: * for_each_encoder * bridge mode_fixup * encoder mode_fixup * crtc mode_fixup * for_each_encoder * bridge disable * encoder prepare * bridge post_disable * disable unused encoders * crtc prepare * crtc mode_set * for_each_encoder * encoder mode_set * bridge mode_set * crtc commit * for_each_encoder * bridge pre_enable * encoder commit * bridge enable dw_hdmi enables the HDMI output in both the bridge mode_set() and also the bridge enable() step. This is duplicated work - we can avoid the setup in mode_set() and just do it in the enable() stage. This simplifies the code a little. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
OpenPOWER on IntegriCloud