aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* drm: Drop ioctl->cmd_drvVille Syrjälä2015-03-27
| | | | | | | | | | ioctl->cmd_drv is pointless and we can just as well stick the full ioctl definition into ioctl->cmd. Cc: Jakob Bornecrantz <jakob@vmware.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: Fix DRM_IOCTL_DEF_DRV()Ville Syrjälä2015-03-27
| | | | | | | | | | | | | Currently DRM_IOCTL_DEF_DRV does '[DRM_IOCTL_NR(DRM_##ioctl)]' which doesn't make much sense since DRM_##ioctl is already a the raw ioctl number. So change it to 'DRM_IOCTL_NR(DRM_IOCTL_##ioctl) - DRM_COMMAND_BASE' which means the DRM_IOCTL_NR() now makes sense, and also this also means if there's a mistake in the DRM_IOCTL_##ioctl macros we might get a warning about it (eg. we would have gotten a sparse warning about the i915 colorkey get/set ioctl being defined to be the same thing). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/atomic-helpers: Properly avoid full modeset danceDaniel Vetter2015-03-27
| | | | | | | | | | | | | | | | | | | | Legacy setCrtc has a nice fastpath for just updating the frontbuffer when the output routing doesn't change. Which I of course tried to keep working, except that I fumbled the job: The helpers correctly compute ->mode_changed, CRTC updates get correctly skipped but connector functions are called unconditionally. Fix this. v2: For the disable sided connector->state->crtc might be NULL. Instead look at the old_connector_state->crtc, but still use the new crtc state for that old crtc. Reported by Thierry. Reported-and-Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> (v1) Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk> (v1) Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* drm: atomic: Allow setting CRTC active propertyDaniel Stone2015-03-23
| | | | | | | | Before, we would set the property, but also return -EINVAL because of a broken fallthrough. Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: atomic: Expose CRTC active propertyDaniel Stone2015-03-23
| | | | | | | | Active was here, and we allowed users to set it, but not to get it as well. Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: crtc_helper: Update hwmode before mode_set callDaniel Stone2015-03-23
| | | | | | | | | | | | | Just as we provide crtc->mode pre-populated with the requested mode, move adjusted_mode into hwmode before we call the crtc's mode_set, making sure to restore it on failure. Allows drivers which thoughtlessly discard adjusted_mode in their mode_set hooks (e.g. Exynos) to use hwmode directly, and also provides some neat symmetry with crtc->mode. Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: mode: Allow NULL modes for equality checkDaniel Stone2015-03-23
| | | | | | | | Since we're now using mode == NULL to represent disabled, it's not wholly surprising that we'd want to compare NULL modes. Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: fb_helper: Simplify exit conditionDaniel Stone2015-03-23
| | | | | | | | | | mode is always NULL at this point in the function, so make our intention clear. Signed-off-by: Daniel Stone <daniels@collabora.com> [danvet: Stop clearing mode too to enlist gcc in tracking uninitialized usage. And remove a space while at it.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: mode: Fix typo in kerneldocDaniel Stone2015-03-23
| | | | | Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/dp: Print the number of bytes processed for aux nacksVille Syrjälä2015-03-23
| | | | | | | | | | | | | | When doing a native or i2c aux write the sink will indicate the number of bytes written even if it the nacks the transfer. When we receive a nack we just return an error upwards, but it might still be interesting to see how many bytes made it before the nack. So include that information in the debug messages. v2: Also print the message size (Jani) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* Merge branch 'drm/next/rcar-du' of git://linuxtv.org/pinchartl/fbdev into ↵Dave Airlie2015-03-22
|\ | | | | | | | | | | | | | | | | | | | | | | drm-next rcar-du fixes * 'drm/next/rcar-du' of git://linuxtv.org/pinchartl/fbdev: drm: rcar-du: Enable the atomic updates API drm: rcar-du: Don't initialize event->pipe field drm: rcar-du: Fix framebuffer reference leak through plane state MAINTAINERS: Remove rcar-du.h entry
| * drm: rcar-du: Enable the atomic updates APILaurent Pinchart2015-03-19
| | | | | | | | | | | | | | Set the DRIVER_ATOMIC flag to enable usage of the atomic updates API with the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * drm: rcar-du: Don't initialize event->pipe fieldLaurent Pinchart2015-03-19
| | | | | | | | | | | | | | The field is set by drm_send_vblank_event(), there's no need to preinitialize it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * drm: rcar-du: Fix framebuffer reference leak through plane stateLaurent Pinchart2015-03-19
| | | | | | | | | | | | | | | | Plane state duplication takes a reference to the framebuffer stored in the state, but state destroy doesn't release it. This causes a reference leak. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * MAINTAINERS: Remove rcar-du.h entryJoe Perches2015-03-19
| | | | | | | | | | | | | | | | commit 2378ad1228d2 ("drm: rcar-du: Remove platform data support") removed the file, remove the pattern. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | Merge branch 'drm/next/adv7511' of git://linuxtv.org/pinchartl/fbdev into ↵Dave Airlie2015-03-22
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-next adv7511 fixes. * 'drm/next/adv7511' of git://linuxtv.org/pinchartl/fbdev: drm: adv7511: Refactor power management drm: adv7511: Fix nested sleep when reading EDID drm: adv7511: Fix DDC error interrupt handling
| * | drm: adv7511: Refactor power managementLaurent Pinchart2015-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the internal dependency on DPMS mode for power management by using a by a powered state boolean instead, and use the new power off handler at probe time. This ensure that the regmap cache is properly marked as dirty when the device is probed, and the registers properly synced during the first power up. As a side effect this removes the initialization of current_edid_segment at probe time, as the field will be initialized when the device is powered on, at the latest right before reading EDID data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Christian Kohn <christian.kohn@xilinx.com> Tested-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
| * | drm: adv7511: Fix nested sleep when reading EDIDLaurent Pinchart2015-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EDID read code waits for the read completion interrupt to occur using wait_event_interruptible(). The condition passed to the macro reads I2C registers. This results in sleeping with the task state set to TASK_INTERRUPTIBLE, triggering a WARN_ON() introduced in commit 8eb23b9f35aae ("sched: Debug nested sleeps"). Fix this by reworking the EDID read code. Instead of checking whether the read is complete through I2C reads, handle the interrupt registers in the interrupt handler and update a new edid_read flag accordingly. As a side effect both the IRQ and polling code paths now process the interrupt sources through the same code path, simplifying the code. Cc: stable@vger.kernel.org Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| * | drm: adv7511: Fix DDC error interrupt handlingLaurent Pinchart2015-03-19
| |/ | | | | | | | | | | | | | | | | The DDC error interrupt bit is located in REG_INT1, not REG_INT0. Update both the interrupt wait code and the interrupt sources reset code accordingly. Cc: stable@vger.kernel.org Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* | Merge branch 'drm-next-4.1' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2015-03-22
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next - DP MST support (disabled by default) - non-ATOM aux support (DCE5+) - output csc support for clamped RGB - Lots of new queries for profiling, Gallium HUD, etc. - Misc fixes * 'drm-next-4.1' of git://people.freedesktop.org/~agd5f/linux: (40 commits) drm/radeon: add DisplayPort MST support (v2) drm/radeon: improve encoder picking functions (v2) drm/radeon: export max link rate calculation drm/radeon: add new atombios encoder/transmitter interfaces drm/radeon: add some MST registers radeon/fb: add wrapper functions around fb connector add/remove radeon/cik: add support for short HPD irqs radeon/si: add support for short HPD irqs radeon/evergreen: add support for short HPD irqs radeon: introduce a dp_work handler drm/dp_mst: add a function to retrieve vcpi slots drm/radeon: program auxch directly (v2) drm/radeon: fix doublescan modes (v2) drm/radeon: typo in parameter description drm/radeon: add support for read reg query from radeon info ioctl drm/radeon: add get_allowed_info_register for CIK drm/radeon: add get_allowed_info_register for SI drm/radeon: add get_allowed_info_register for cayman/TN drm/radeon: add get_allowed_info_register for EG/BTC drm/radeon: add get_allowed_info_register for r6xx/r7xx ...
| * drm/radeon: add DisplayPort MST support (v2)Dave Airlie2015-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds initial DP 1.2 MST support to radeon, on CAYMAN and up in theory. This is off by default. v2: agd5f: - add UNIPHY3 offsets - move atom cmd table code into atombios_encoders.c - whitespace cleanup - replace some magic numbers with proper defines Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: improve encoder picking functions (v2)Dave Airlie2015-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | For MST we need to be able to pick front end encoders separate from backend, but only for MST, so we need to make the encoder picking interface smarter. v2: agd5f: squash in: drm/radeon: release digital encoder before asking for new one Reported-by: Dieter Nützel <Dieter@nuetzel-hh.de> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: export max link rate calculationDave Airlie2015-03-19
| | | | | | | | | | | | | | We need this in the MST code later. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add new atombios encoder/transmitter interfacesDave Airlie2015-03-19
| | | | | | | | | | | | | | | | These allow overriding the encoder id with the frontend, we need this for setting up MST. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add some MST registersDave Airlie2015-03-19
| | | | | | | | | | | | | | These registers will be used later to setup Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * radeon/fb: add wrapper functions around fb connector add/removeDave Airlie2015-03-19
| | | | | | | | | | | | | | These are just two wrappers to be used in the MST code later. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * radeon/cik: add support for short HPD irqsAlex Deucher2015-03-19
| | | | | | | | | | | | This adds support to process short HPD irqs on CIK gpus. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * radeon/si: add support for short HPD irqsDave Airlie2015-03-19
| | | | | | | | | | | | | | This adds support to process short HPD irqs on SI gpus. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * radeon/evergreen: add support for short HPD irqsDave Airlie2015-03-19
| | | | | | | | | | | | | | | | This adds support for processing short irqs, and triggering the dp_work. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * radeon: introduce a dp_work handlerDave Airlie2015-03-19
| | | | | | | | | | | | | | | | This is to be called on short HPD irqs, just introduce the basic infrastructure for it. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/dp_mst: add a function to retrieve vcpi slotsDave Airlie2015-03-19
| | | | | | | | | | | | | | | | radeon requires this to get the slots for later filling out a table on every transition. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: program auxch directly (v2)Dave Airlie2015-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atombios tables have an unfortunate restriction on only being able to write 12 bytes, MST really wants 16-bytes here, and since the hw can do it, we should just write directly to it. This uses a module option to allow for it now, and maybe we should provide the old code as a fallback for a while. v2: (agd5f) - move registers to a proper register header - only enable on DCE5+ - enable by default on DCE5+ - Switch pad to aux mode before using it - reformat instance handling to better match the rest of the driver Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: fix doublescan modes (v2)Alex Deucher2015-03-19
| | | | | | | | | | | | | | | | | | Use the correct flags for atom. v2: handle DRM_MODE_FLAG_DBLCLK Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
| * drm/radeon: typo in parameter descriptionVincent Batts2015-03-19
| | | | | | | | | | | | | | "defaul" -> "default" Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add support for read reg query from radeon info ioctlAlex Deucher2015-03-19
| | | | | | | | | | | | | | | | | | | | This allows us to query certain registers from userspace for profiling and harvest configuration. E.g., it can be used by the GALLIUM_HUD for profiling the status of various gfx blocks. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add get_allowed_info_register for CIKAlex Deucher2015-03-19
| | | | | | | | | | | | | | Registers that can be fetched from the info ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add get_allowed_info_register for SIAlex Deucher2015-03-19
| | | | | | | | | | | | | | Registers that can be fetched from the info ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add get_allowed_info_register for cayman/TNAlex Deucher2015-03-19
| | | | | | | | | | | | | | Registers that can be fetched from the info ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add get_allowed_info_register for EG/BTCAlex Deucher2015-03-19
| | | | | | | | | | | | | | Registers that can be fetched from the info ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add get_allowed_info_register for r6xx/r7xxAlex Deucher2015-03-19
| | | | | | | | | | | | | | Registers that can be fetched from the info ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add get_allowed_info_register function for r1xx-r5xxAlex Deucher2015-03-19
| | | | | | | | | | | | | | Just a stub. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add new callback for info ioctl register accessorAlex Deucher2015-03-19
| | | | | | | | | | | | | | | | | | | | | | | | This adds a callback for each asic family to determine what registers are allowed to be read back via the info ioctl. The idea here is to allow usermode to query things like GPU status registers or GPU harvest registers for profiling and determining the gfx config. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: add INFO query for current sclk/mclkAlex Deucher2015-03-19
| | | | | | | | | | | | | | | | Allow the UMDs to query the current sclk/mclk for profiling, etc. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/kv: implement get_current_sclk/mclkAlex Deucher2015-03-19
| | | | | | | | | | | | | | Will be used for exposing current clocks via INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/tn: implement get_current_sclk/mclkAlex Deucher2015-03-19
| | | | | | | | | | | | | | Will be used for exposing current clocks via INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/sumo: implement get_current_sclk/mclkAlex Deucher2015-03-19
| | | | | | | | | | | | | | Will be used for exposing current clocks via INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/ci: implement get_current_sclk/mclkAlex Deucher2015-03-19
| | | | | | | | | | | | | | Will be used for exposing current clocks via INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/si: implement get_current_sclk/mclkAlex Deucher2015-03-19
| | | | | | | | | | | | | | Will be used for exposing current clocks via INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon/ni: implement get_current_sclk/mclkAlex Deucher2015-03-19
| | | | | | | | | | | | | | Will be used for exposing current clocks via INFO ioctl. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * drm/radeon: remove some rv7xx leftovers from btc dpm codeAlex Deucher2015-03-19
| | | | | | | | | | | | | | Some copy paste leftovers. No functional change. Tested-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>