aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
2019-10-28drm/tegra: sor: Stabilize eDPThierry Reding1-89/+49
Rework eDP code to correspond more closely to what's documented. This also improves the reliability of modesets. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: sor: Hook up I2C-over-AUX to outputThierry Reding1-0/+2
This is necessary for the output abstraction to retrieve a list of valid modes from the EDID of a connected panel/monitor. This will be useful in conjunction with DisplayPort support that will be added in a subsequent patch, so that the driver can read EDID via the AUX channel. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: sor: Use DP link training helpersThierry Reding4-290/+470
Make use of the DP link training helpers to implement full and fast link training. While at it, refactor some of the code and remove various code sequences that are not necessary. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Add DisplayPort link training helperThierry Reding2-0/+524
Add a helper that will perform link training as described in the DisplayPort specification. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Add support for eDP link ratesThierry Reding2-0/+136
Parses additional link rates from DPCD if the sink supports eDP 1.4. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Add drm_dp_link_choose() helperThierry Reding2-0/+60
This helper chooses an appropriate configuration, according to the bitrate requirements of the video mode and the capabilities of the DisplayPort sink. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Enable alternate scrambler reset when supportedThierry Reding1-0/+7
If the sink is eDP and supports the alternate scrambler reset, enable it. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Set channel coding on link configurationThierry Reding1-1/+10
Make use of ANSI 8B/10B channel coding if the DisplayPort sink supports it. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Read AUX read interval from DPCDThierry Reding2-0/+42
Store the AUX read interval from DPCD, so that it can be used to wait for the durations given in the specification during link training. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Read eDP version from DPCDThierry Reding2-2/+18
If the sink supports eDP, read the eDP revision from it's DPCD. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Read alternate scrambler reset capability from sinkThierry Reding2-0/+12
Parse from the sink capabilities whether or not the eDP alternate scrambler reset value of 0xfffe is supported. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Read channel coding capability from sinkThierry Reding2-0/+10
Parse from the sink capabilities whether or not it supports ANSI 8B/10B channel coding as specified in ANSI X3.230-1994, clause 11. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Read TPS3 capability from sinkThierry Reding2-0/+10
The TPS3 capability can be exposed by DP 1.2 and later sinks if they support the alternative training pattern for channel equalization. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Read fast training capability from linkThierry Reding2-0/+10
While probing the DisplayPort link, query the fast training capability. If supported, drivers can use the fast link training sequence instead of the more involved full link training sequence. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Probe link using existing parsing helpersThierry Reding1-7/+6
Use existing parsing helpers to probe a DisplayPort link. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Turn link capabilities into booleansThierry Reding3-8/+36
Rather than storing capabilities as flags in an integer, use a separate boolean per capability. This simplifies the code that checks for these capabilities. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Track link capabilities alongside settingsThierry Reding4-28/+39
Store capabilities in max_* fields and add separate fields for the currently selected settings. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dp: Add drm_dp_link_reset() implementationThierry Reding1-1/+12
Subsequent patches will add non-volatile fields to struct drm_dp_link, so introduce a function to zero out only the volatile fields. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: Add missing kerneldoc for struct drm_dp_linkThierry Reding1-0/+7
The drm_dp_link structure tracks capabilities on the DP link. Add some kerneldoc to explain what each of its fields means. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dpaux: Parameterize CMH, DRVZ and DRVIThierry Reding1-10/+38
The CMH, DRVZ and DRVI values vary depending on the SoC generation. Move them into SoC specific structures so that DT compatible string matching can be used to select the right parameters and write them to hardware at the right time. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dpaux: Fix crash if VDD supply is absentThierry Reding1-8/+14
In order to properly make the VDD supply optional, all accesses to the regulator need to be ignored, because the regulator core doesn't treat NULL special. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dpaux: Retry on transfer size mismatchThierry Reding1-7/+18
When a transfer didn't complete transmission of the requested number of bytes, signal that the transaction should be retried. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: dpaux: Support monitor hotpluggingThierry Reding1-18/+29
The dpaux driver has a quirk built-in that will delay initialization of the display driver for a short while, trying to detect an eDP panel. The reason for this quirk is that the panel may not report as connected until after the display driver has initialized, at which point the fbdev emulation will have fallen back to 1024x768 as default resolution, which will likely not be the eDP panel's native resolution. With upcoming DisplayPort support, the code needs to be able to cope with hotpluggable monitors as well. Waiting for a panel to show up is no longer going to work because the monitor may not be attached on boot. If the output runs in DisplayPort mode, skip waiting for the panel to show up. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: gem: Use sg_alloc_table_from_pages()Thierry Reding1-7/+2
Instead of manually creating the SG table for a discontiguous buffer, use the existing sg_alloc_table_from_pages(). Note that this is not safe to be used with the ARM DMA/IOMMU integration code because that will not ensure that the whole buffer is mapped contiguously. Depending on the size of the individual entries the mapping may end up containing holes to ensure alignment. However, we only ever use these buffers with explicit IOMMU API usage and know how to avoid these holes. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: gem: Always map SG tables for DMA-BUFsThierry Reding1-3/+3
When an importer wants to map a DMA-BUF, make sure to always actually map it, irrespective of whether the buffer is contiguous or not. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: gem: Use dma_get_sgtable()Thierry Reding1-4/+2
Rather than manually creating an SG table in an incorrect way, let the standard dma_get_sgtable() function do it. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: gem: Rename paddr -> iovaThierry Reding5-16/+16
The address can refer to either physical memory or IO virtual memory. If referring to IO virtual memory, there will always be an associated physical memory address. Rename this variable to "iova" to clarify in all cases that this is the IO virtual memory, which in the absence of an IOMMU is identical to the physical address. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: Move IOMMU group into host1x clientThierry Reding7-40/+29
Handling of the IOMMU group attachment is common to all clients, so move the group into the client to simplify code. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: vic: Use common IOMMU attach/detach codeThierry Reding1-19/+8
Reuse common code to attach to or detach from an IOMMU domain. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: vic: Inherit DMA mask from host1xThierry Reding1-0/+7
VIC, just like all other host1x clients, has the same addressing range as its parent host1x device. Inherit the DMA mask to reflect that. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: vic: Skip stream ID programming without IOMMUThierry Reding1-3/+5
If VIC is not behind an IOMMU, don't touch any of the registers related to stream ID programming. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: Use DRM_DEBUG_DRIVER for driver messagesThierry Reding1-4/+4
The driver-specific messages should use the DRM_UT_DRIVER category so that they can be properly filtered. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/tegra: Inherit device DMA parameters from host1xThierry Reding2-0/+18
The display controllers and VIC don't have any limitations on the DMA segment size. Inherit the DMA parameters from the parent device, which also doesn't have any such limitations. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28gpu: host1x: Request channels for clients, not devicesThierry Reding3-3/+3
A struct device doesn't carry much information that a channel might be interested in, but the client very much does. Request channels for the clients rather than their parent devices and store a pointer to them in order to have that information available when needed. Signed-off-by: Thierry Reding <[email protected]>
2019-10-28drm/fb-helper: Remove drm_fb_helper_defio_init() and update docsThomas Zimmermann1-48/+13
There are no users of drm_fb_helper_defio_init(), so we can remove it. The documentation around defio support is a bit misleading and should mention compatibility issues with SHMEM helpers. Clarify this. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Noralf Trønnes <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-27drm/i915/rps: Flip interpretation of ips fmin/fmax to max rpsChris Wilson1-3/+5
ips uses clock delays as opposed to rps frequency bins. To fit the delays into the same rps calculations, we need to invert the ips delays. Fixes: 3e7abf814193 ("drm/i915: Extract GT render power state management") Signed-off-by: Chris Wilson <[email protected]> Cc: Andi Shyti <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-27drm/i915: Put future HW and their uAPIs under STAGING & BROKENChris Wilson3-0/+28
We would like some freedom to break the user API/ABI for future HW but yet still expose the driver for upstream development on that HW. Currently, we have the i915.force_probe module parameter to avoid binding to HW while the driver is under development, but that is still a little too soft with respect to the stringent no-regression rules if we also plan to be redesigning the uAPI to go along with the new HW. To allow the uAPI to be changed during development, only expose that API and in development HW under STAGING (and BROKEN). Hopefully, making it explicit that such interfaces to that HW are under development and not to be blindly enabled by distributions. Signed-off-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Dave Airlie <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Jani Nikula <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-26drm/i915: Split memory_region initialisation into its own fileChris Wilson6-74/+75
Pull the memory region bookkeeping into its file. Let's start clean and see how long it lasts! Signed-off-by: Chris Wilson <[email protected]> Cc: Matthew Auld <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-26drm/i915: Extract the GuC interrupt handlersAndi Shyti3-102/+89
Pull the GuC interrupt handlers out of i915_irq.c. They now use the GT interrupt facilities rather than the central dispatch. Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti <[email protected]> Cc: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-26drm/i915: Extract GT render power state managementAndi Shyti24-2310/+2126
i915_irq.c is large. One reason for this is that has a large chunk of the GT render power management stashed away in it. Extract that logic out of i915_irq.c and intel_pm.c and put it under one roof. Based on a patch by Chris Wilson. Signed-off-by: Andi Shyti <[email protected]> Cc: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-26drm/i915/tgl: Adjust the location of RING_MI_MODE in the context imageChris Wilson2-3/+87
The location of RING_MI_MODE (used to stop the ring across resets) moved for Tigerlake. Fixup the new location and include a selftest to verify the location in the default context image. Signed-off-by: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Acked-by: Mika Kuoppala <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-26drm/i915: Encapsulate kconfig constant values inside boolean predicatesChris Wilson5-5/+19
Avoid angering clang and smatch by using a constant value in a '&&' test, by forcing that constant value into a boolean. E.g., drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c:159:13: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] if (!delay && CONFIG_DRM_I915_PREEMPT_TIMEOUT) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: kbuild test robot <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Jani Nikula <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/tc: Clear DKL_TX_PMD_LANE_SUS before program voltage swingJosé Roberto de Souza2-0/+8
This sequence was recently added to fix internal HW sequences to reset TC ports. HSDES: 1507287614 HSDES: 14010071447 BSpec: 49292 Reviewed-by: Lucas De Marchi <[email protected]> Cc: Lucas De Marchi <[email protected]> Signed-off-by: José Roberto de Souza <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/pmu: Initialise the spinlock before registeringChris Wilson1-18/+19
As the GT may be running in parallel with the module initialisation code, we may enter i915_pmu_gt_parked() as we are executing i915_pmu_register(). We have to init the spinlock before we mark pmu.event_init so that it is available for use by i915_pmu_gt_parked() (which may run as soon as event_init is set). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112127 Signed-off-by: Chris Wilson <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/selftests/blt: add some kthreads into the mixMatthew Auld1-25/+153
We can be more aggressive in our testing by launching a number of kthreads, where each is submitting its own copy or fill batches on a set of random sized objects. Also since the underlying fill and copy batches can be pre-empted mid-batch(for particularly large objects), throw in a random mixture of ctx priorities per thread to make pre-emption a possibility. Signed-off-by: Matthew Auld <[email protected]> Cc: Chris Wilson <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/selftests: add sanity selftest for huge-GTT-pagesMatthew Auld1-0/+99
Now that for all the relevant backends we do randomised testing, we need to make sure we still sanity check the obvious cases that might blow up, such that introducing a temporary regression is less likely. Also rather than do this for every backend, just limit to our two memory types: system and local. Suggested-by: Chris Wilson <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Cc: Chris Wilson <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/selftests: prefer random sizes for the huge-GTT-page smoke testsMatthew Auld1-149/+80
Ditch the dubious static list of sizes to enumerate, in favour of choosing a random size within the limits of each backing store. With repeated CI runs this should give us a wider range of object sizes, and in turn more page-size combinations, while using less machine time. Signed-off-by: Matthew Auld <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/selftests: extend coverage to include LMEM huge-pagesMatthew Auld1-1/+122
Add LMEM objects to list of backends we test for huge-GTT-pages. Signed-off-by: Matthew Auld <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/selftests: add write-dword test for LMEMMatthew Auld1-0/+166
Simple test writing to dwords across an object, using various engines in a randomized order, checking that our writes land from the cpu. Signed-off-by: Matthew Auld <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25drm/i915/lmem: support kernel mappingAbdiel Janulgue5-18/+192
We can create LMEM objects, but we also need to support mapping them into kernel space for internal use. Signed-off-by: Abdiel Janulgue <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Signed-off-by: Steve Hampson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]