Commit graph

495730 commits

Author SHA1 Message Date
Slava Grigorev 6f945693be radeon/audio: applied audio_dpms() and audio_mode_set() calls
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:17 -05:00
Slava Grigorev 6e72376dcc radeon/audio: consolidate audio_mode_set() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:17 -05:00
Slava Grigorev 7f604077ac radeon/audio: removed unnecessary debug settings
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:16 -05:00
Slava Grigorev 3be2e7d0e7 radeon/audio: moved mute programming to a separate function
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:15 -05:00
Slava Grigorev 1852c9a09a radeon/audio: moved audio packet programming to a separate function
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:14 -05:00
Slava Grigorev baa7d8e451 radeon/audio: set_avi_packet() function cleanup
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:14 -05:00
Slava Grigorev 8ffea8570d radeon/audio: removed unnecessary CRC control programing
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:13 -05:00
Slava Grigorev be273e58f0 radeon: moved HDMI color depth programming to a separate function
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:12 -05:00
Alex Deucher 930a978512 radeon/audio: moved VBI packet programming to separate functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:12 -05:00
Slava Grigorev 64424d6e45 radeon/audio: consolidate update_acr() functions (v2)
V2: fix missing dce6 callback

Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:11 -05:00
Slava Grigorev 96ea7afbc2 radeon/audio: consolidate update_avi_infoframe() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:10 -05:00
Slava Grigorev a85d682a65 radeon/audio: consolidate audio_set_dto() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:10 -05:00
Slava Grigorev 7991d66501 radeon/audio: consolidate audio_fini() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:09 -05:00
Slava Grigorev 8bf598207e radeon/audio: consolidate audio_enable() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:08 -05:00
Slava Grigorev 88252d7728 radeon/audio: consolidate select_pin() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:07 -05:00
Slava Grigorev 3cdde027aa radeon/audio: consolidate audio_get_pin() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:07 -05:00
Slava Grigorev 87654f87af radeon/audio: consolidate write_latency_fields() functions
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:06 -05:00
Slava Grigorev 00a9d4bcf8 radeon/audio: consolidate write_speaker_allocation() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:42:05 -05:00
Alex Deucher 070a2e63f6 radeon/audio: consolidate write_sad_regs() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:41:55 -05:00
Slava Grigorev 1a626b68fb radeon/audio: defined initial audio interface that gets initialized via detect() call
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:39:00 -05:00
Slava Grigorev bfc1f97d8a radeon/audio: consolidate audio_init() functions
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:59 -05:00
Alex Deucher 49ead33b9f drm/radeon: comment out some currently unused 7xx dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:58 -05:00
Alex Deucher ed50890de6 drm/radeon: comment out some currently unused eg dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:58 -05:00
Alex Deucher 1afde6b265 drm/radeon: comment out some currently unused sumo dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:57 -05:00
Alex Deucher 6421d6128a drm/radeon: comment out some currently unused tn dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:56 -05:00
Alex Deucher 7ff96f9dd2 drm/radeon: comment out some currently unused btc dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:55 -05:00
Alex Deucher de6267d0a6 drm/radeon: comment out some currently unused ni dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:55 -05:00
Alex Deucher dafc519db3 drm/radeon: comment out some currently unused kv dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:54 -05:00
Alex Deucher 9876913179 drm/radeon: comment out some currently unused si dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:53 -05:00
Alex Deucher 64e580447f drm/radeon: comment out some currently unused ci dpm code
Keep it around for reference.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:53 -05:00
Rickard Strandqvist bcd705a0de gpu: drm: radeon: radeon_object: Remove unused function
Remove the function radeon_bo_fbdev_mmap() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:52 -05:00
Rickard Strandqvist 089e746be4 drm/radeon/radeon_fb: Remove unused function
Remove the function radeon_fbdev_total_size() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:51 -05:00
Rickard Strandqvist 0554309e19 drm/radeon/radeon_i2c: Remove unused function
Remove the function radeon_best_encoder() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:51 -05:00
Alex Deucher de5670c220 drm/radeon: enable smc fan control on SI
Working now with Oleg's last round of fixes.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:50 -05:00
Oleg Chernovskiy 47fd97ca73 fixes for SI fan handling
Added temperature values to SMC payload.
Fan mode check moved check to proper place.

Signed-off-by: Oleg Chernovskiy <algonkvel@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:49 -05:00
Alex Deucher 5e8150a687 drm/radeon: bind fan control on SI cards to hwmon interface
This adds a possibility to control fan on SI parts
via exported hwmon variables. Note that automatic
ucode fan management pauses if you choose to enable
manual fan control.  Use with caution!

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:48 -05:00
Oleg Chernovskiy 36689e5750 drm/radeon: bind fan control on CI cards to hwmon interface (v2)
This adds a possibility to control fan on CI parts
via exported hwmon variables. Note that automatic
ucode fan management pauses if you choose to enable
manual fan control.  Use with caution!

v2: agd5f: fix formatting, squash in:

    minor fix for pwm1_enable exposed value

    Track smc control in addition to fan mode
    This fixes pwm1_enable being constantly set
    to 1 because of enabled smc control

also handle the case where smc fan control is disabled.

Signed-off-by: Oleg Chernovskiy <algonkvel@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:48 -05:00
Oleg Chernovskiy 99736703a9 drm/radeon: add hwmon interface for managing fan pwm (v2)
This adds percent-based fan control. Attributes (I hope) follow the
sysfs-interface specification:
* pwm1 - fan speed query/manage
* pwm1_max, pwm1_min - min/max values for fan pwm (constant)
* pwm1_enable - fan control query/manage (enable/disable)

(There is no rpm-based control for now)

v2: agd5f: fix formatting

Signed-off-by: Oleg Chernovskiy <algonkvel@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:47 -05:00
Oleg Chernovskiy a35a4b2b18 add common fan control asic callbacks
Adds 4 callbacks for managing fan state/speed
* fan_ctrl_set_mode - manages fan control mode (nonzero == manual)
* fan_ctrl_get_mode - queries fan control mode
* set_fan_speed_percent - manages fan speed as percentage value
* get_fan_speed_percent - queries fan speed as percentage value

Signed-off-by: Oleg Chernovskiy <algonkvel@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:46 -05:00
Glenn Kennard 16613743ad drm/radeon: evergreen/cayman indirect draw support (v2)
Add the necessary set of commands to support OpenGL
indirect draw calls on evergreen/cayman devices that
do not have VM.

v2: agd5f: fix warning on 32-bit

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-01-22 10:38:46 -05:00
Dave Airlie 281d1bbd34 Merge remote-tracking branch 'origin/master' into drm-next
Backmerge Linus tree after rc5 + drm-fixes went in.

There were a few amdkfd conflicts I wanted to avoid,
and Ben requested this for nouveau also.

Conflicts:
	drivers/gpu/drm/amd/amdkfd/Makefile
	drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
	drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
	drivers/gpu/drm/amd/amdkfd/kfd_priv.h
	drivers/gpu/drm/amd/include/kgd_kfd_interface.h
	drivers/gpu/drm/i915/intel_runtime_pm.c
	drivers/gpu/drm/radeon/radeon_kfd.c
2015-01-22 10:44:41 +10:00
Dave Airlie bfa55bd499 Merge branch 'drm-sti-next-add-dvo' of git://git.linaro.org/people/benjamin.gaignard/kernel into drm-next
This patch enable the last big hardware feature of my driver: the
connector for panel.
Like for HMDI and HDA, Digital Video Out (DVO) create brige, encoder
and connector
drm objects.

* 'drm-sti-next-add-dvo' of git://git.linaro.org/people/benjamin.gaignard/kernel:
  drm: sti: add DVO output connector
2015-01-22 09:59:25 +10:00
Dave Airlie c0d2792b2a Merge tag 'atmel-hlcdc-drm-3.20' of https://github.com/bbrezillon/linux-at91 into drm-next
Add atmel HLCDC driver.

* tag 'atmel-hlcdc-drm-3.20' of https://github.com/bbrezillon/linux-at91:
  drm: add DT bindings documentation for atmel-hlcdc-dc driver
  drm: add Atmel HLCDC Display Controller support
  drm: panel: simple-panel: add bus format information for foxlink panel
  drm: panel: simple-panel: add support for bus_format retrieval
  drm: add bus_formats and num_bus_formats fields to drm_display_info
2015-01-22 09:48:02 +10:00
Dave Airlie ca1130de2a Merge tag 'drm-amdkfd-next-2015-01-21' of git://people.freedesktop.org/~gabbayo/linux into drm-next
- Infrastructure work in amdkfd to prepare for VI support. This work mainly
  includes separating modules into ASIC-specific functionality, adding
  new properties that are relevant for VI, making sure that shared code is
  reused, etc.

- Improve mechanism of submitting packets to HIQ (the kernel queue that amdkfd
  uses to issue commands to the GPU). The driver used to verify that each CS
  was read by the GPU. However, this proved to be both unnecessary and erroneous.
  Therefore, we cancelled this verification.

- Moved initialization of compute VMIDs into radeon driver

- Various minor fixes

* tag 'drm-amdkfd-next-2015-01-21' of git://people.freedesktop.org/~gabbayo/linux: (22 commits)
  drm/amdkfd: Fix description of sched_policy module parameter
  drm/amdkfd: Remove sync_with_hw() from amdkfd
  drm/amdkfd: Remove unused function busy_wait()
  drm/amdkfd: Replace cpu_relax() with schedule() in DQM
  drm/amdkfd: Fix for-loop when allocating HQD (non-HWS)
  drm/amdkfd: Add initial VI support for KQ
  drm/amdkfd: Encapsulate KQ functions in ops structure
  drm/amdkfd: Add initial VI support for DQM
  drm/amdkfd: Encapsulate DQM functions in ops structure
  drm/amdkfd: Don't BUG on freeing GART sub-allocation
  drm/amdkfd: Fix logic of destroy_queue_nocpsch()
  MAINTAINERS: Update amdkfd files
  drm/amdkfd: Change MQD manager to be H/W specific
  drm/amdkfd: Add asic property to kfd_device_info
  drm/amdkfd: Make KFD_MQD_TYPE enum types H/W agnostic
  drm/amdkfd: Add new VI-specific queue properties
  drm/radeon: Use new cik_structs.h file
  drm/amdkfd: Don't include header files from radeon
  drm/amd: Put cik structures in a common place
  drm/radeon: Don't use relative paths in #include
  ...
2015-01-22 09:44:46 +10:00
Linus Torvalds b942c653ae It's been reported that function tracing does not work on the sh architecture
because gcc 4.8 for superH does not support -m32, and the recordmcount.pl
 script adds "-m32" when re-compiling the object files with the mcount
 locations.
 
 I was not able to reproduce this problem, as it seems that -m32 works fine
 for my cross compiler gcc 4.6.3, but I have to assume that -m32 was
 deprecated somewhere between 4.6 and 4.8. As it still seems to compile
 fine without -m32, I have no reason not to add this patch, as having
 -m32 seems to cause trouble for others.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUv9sOAAoJEEjnJuOKh9ldPUIIAJle6R3v+53gylalVhOnn56f
 fQkONz1HvLteneBGTFG4xiwK6BJNeTOcLOQbCfBwNBZUjg7QG5eEU3wBG6DCZNIf
 Tc1DqB78Fx9HnI0wJby/VtgIMbTqvPsXta0J75g7EFXwaP8bUZFL1s6QmskKlFTf
 Gvhr93YP2SFawRf8Gy9AVCkLBSwU1T5y0IsQXPw49buNT+aWwoMWCNJb03rLfZYz
 MCNgTfQxf4aYK1EThvb8xurjD2rZkJmRc/LN37vj8M+2e9HoIitCd4O/doxEQtvK
 aFw7q/K23bFIXfjKoF1Yjk8hLoQZgCxruZwmZyxEEPtTGsUfNcSyfgpHTNeNDrk=
 =d6qd
 -----END PGP SIGNATURE-----

Merge tag 'trace-sh-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull superh tracing fix from Steven Rostedt:
 "It's been reported that function tracing does not work on the sh
  architecture because gcc 4.8 for superH does not support -m32, and the
  recordmcount.pl script adds "-m32" when re-compiling the object files
  with the mcount locations.

  I was not able to reproduce this problem, as it seems that -m32 works
  fine for my cross compiler gcc 4.6.3, but I have to assume that -m32
  was deprecated somewhere between 4.6 and 4.8.  As it still seems to
  compile fine without -m32, I have no reason not to add this patch, as
  having -m32 seems to cause trouble for others"

* tag 'trace-sh-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  scripts/recordmcount.pl: There is no -m32 gcc option on Super-H anymore
2015-01-22 06:26:07 +12:00
Boris Brezillon 5b7e944ec8 drm: add DT bindings documentation for atmel-hlcdc-dc driver
The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
controller device.

The HLCDC block provides a single RGB output port, and only supports LCD
panels connection to LCD panels for now.

The atmel,panel property link the HLCDC RGB output with the LCD panel
connected on this port (note that the HLCDC RGB connector implementation
makes use of the DRM panel framework).

Connection to other external devices (DRM bridges) might be added later by
mean of a new atmel,xxx (atmel,bridge) property.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-21 09:46:02 +01:00
Boris Brezillon 1a396789f6 drm: add Atmel HLCDC Display Controller support
The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
controller device.

This display controller supports at least one primary plane and might
provide several overlays and an hardware cursor depending on the IP
version.

At the moment, this driver only implements an RGB connector to interface
with LCD panels, but support for other kind of external devices might be
added later.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Anthony Harivel <anthony.harivel@emtrion.de>
Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2015-01-21 09:46:02 +01:00
Boris Brezillon bb276cb3a3 drm: panel: simple-panel: add bus format information for foxlink panel
Foxlink's fl500wvr00-a0t supports RGB888 format.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Thierry Reding <treding@nvidia.com>
2015-01-21 09:45:56 +01:00
Boris Brezillon 795f7ab3a4 drm: panel: simple-panel: add support for bus_format retrieval
Provide a way to specify panel requirement in terms of supported media bus
format (particularly useful for panels connected to an RGB or LVDS bus).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Thierry Reding <treding@nvidia.com>
2015-01-21 09:45:45 +01:00
Boris Brezillon b5571e9df6 drm: add bus_formats and num_bus_formats fields to drm_display_info
Add bus_formats and num_bus_formats fields and
drm_display_info_set_bus_formats helper function to specify the bus
formats supported by a given display.

This information can be used by display controller drivers to configure
the output interface appropriately (i.e. RGB565, RGB666 or RGB888 on raw
RGB or LVDS busses).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Thierry Reding <treding@nvidia.com>
2015-01-21 09:45:34 +01:00