aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-02-08drm/amdgpu: update HAINAN_GB_ADDR_CONFIG_GOLDENFlora Cui1-1/+1
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: update VERDE_GB_ADDR_CONFIG_GOLDENFlora Cui1-1/+1
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: refine si_read_registerFlora Cui1-17/+73
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu/gfx6: clean up spi configurationFlora Cui1-8/+4
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu/gfx6: clean up cu configurationFlora Cui1-62/+38
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu/gfx6: clean up rb configurationFlora Cui1-59/+42
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: refine vce3.0 code and related powerplay pg code.Rex Zhu3-51/+36
1. not start vce3.0 when hw_init 2. stop vce3.0 when vce idle. 3. pg mask used to ctrl power down/up vce. 4. change cg pg sequence in powerplay. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: move subfunctions to the front of vce_v2_0.c.Rex Zhu1-177/+171
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: enable vce pg feature on Kv.Rex Zhu1-2/+2
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: refine code for VCE2.0 and related dpm code.Rex Zhu4-112/+111
v2: clean up vce cg function. use sw cg when vce stoped. 1. implement vce_stop function. 2. not start vce when hw_init. 3. refine vce cg/pg code. 4. delete bypass mode. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: when dpm disabled, also need to stop/start vce.Rex Zhu1-0/+9
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: refine uvd5.0/6.0 code.Rex Zhu4-42/+30
1. delete redundant cg pg mask check. pg mask use to ctrl power on/down uvd. not start/stop uvd. cg mask will be check when enable mgcg. 2. no need to start uvd when initializ. when ring test/ib test/encode, uvd was enabled. when uvd idle, uvd was stopped. 3. chang cg pg sequence in powerplay. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: fix uvd can't initialized when dpm disabled on Ci.Rex Zhu1-6/+14
need to start smc when dpm disabled. otherwise, uvd can't get response from smu. so uvd ring test and ib test will timeout. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: refine uvd4.2 init/stop code.Rex Zhu1-41/+70
1. set uvd_status busy before uvd_start. 2. clear uvd_status to 0 after uvd stop. smu firmware may check uvd_status. 3. wait uvd idle before stop uvd. 4. not start uvd when hw_init. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: refine uvd pg code in kv_dpm.cRex Zhu1-21/+8
1. no need to set cg as use hw dynamic cg. 2. when uvd idle, stop uvd. encode, start uvd. 3. if pg feature enabled, power on/down uvd by smu. 4. drm/amdgpu: dpm do not set uvd pg status. Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: power down/up uvd4 when smu disabled.Rex Zhu1-1/+16
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: add current_pg_status register define for smu7.1Rex Zhu1-0/+1
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/amdgpu: when dpm disabled, also can enable uvd cg/pg.Rex Zhu1-0/+9
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2017-02-08drm/atomic: fix an error code in mode_fixup()Dan Carpenter1-1/+1
Having "ret" be a bool type works for everything except ret = funcs->atomic_check(). The other functions all return zero on error but ->atomic_check() returns negative error codes. We want to propagate the error code but instead we return 1. I found this bug with static analysis and I don't know if it affects run time. Fixes: 4cd4df8080a3 ("drm/atomic: Add ->atomic_check() to encoder helpers") Cc: [email protected] Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/20170207234601.GA23981@mwanda
2017-02-08drm: Cancel drm_fb_helper_resume_work on unloadChris Wilson1-0/+1
We can not allow the worker to run after its fbdev, or even the module, has been removed. Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()") Signed-off-by: Chris Wilson <[email protected]> Cc: Noralf Trønnes <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: [email protected] Cc: <[email protected]> # v4.9+ Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-02-08drm: Cancel drm_fb_helper_dirty_work on unloadChris Wilson1-0/+2
We can not allow the worker to run after its fbdev, or even the module, has been removed. Fixes: eaa434defaca ("drm/fb-helper: Add fb_deferred_io support") Signed-off-by: Chris Wilson <[email protected]> Cc: Noralf Trønnes <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: [email protected] Cc: <[email protected]> # v4.7+ Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-02-07drm/fsl-dcu: check for clk_prepare_enable() errorFabio Estevam1-2/+6
clk_prepare_enable() may fail, so we should better check its return value. Also place the of_node_put() function right after clk_prepare_enable(), in order to avoid calling of_node_put() twice in case clk_prepare_enable() fails. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Stefan Agner <[email protected]>
2017-02-07drm/fsl-dcu: remove unneeded 'ret' assignmentFabio Estevam1-3/+1
When devm_kzalloc() fails there is no need to assign an error code to the 'ret' variable as it will not be used after jumping to the 'err_node_put' label, so just remove the assignment. Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Gabriel Krisman Bertazi <[email protected]> Signed-off-by: Stefan Agner <[email protected]>
2017-02-08Merge branch 'exynos-drm-next' of ↵Dave Airlie5-41/+137
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summary: - Add UHD support on TM2/TM2E boards. . adding interlace mode support and 297MHz pixel clock support for UHD mode, setting sysreg register in case of HW trigger mode, and adding SiI8620 MHL bridge device support. - Fix trigger mode issue on Rinato board. . On Rinato board, HW trigger mode doesn't work so fix it. - Some fixup and cleanup. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: fimd: Do not use HW trigger for exynos3250 drm/exynos/hdmi: add bridge support drm/exynos/decon5433: signal vblank only on odd fields drm/exynos/decon5433: add support for interlace modes drm/exynos/hdmi: fix PLL for 27MHz settings drm/exynos/hdmi: fix VSI infoframe registers drm/exynos/hdmi: add 297MHz pixel clock support drm/exynos: g2d: change platform driver name to 'exynos-drm-g2d' drm/exynos/decon5433: configure sysreg in case of hardware trigger
2017-02-08Merge branch 'drm-rockchip-next-2017-02-07' of ↵Dave Airlie1-1/+1
https://github.com/markyzq/kernel-drm-rockchip into drm-next Single compile fix. * 'drm-rockchip-next-2017-02-07' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: cdn-dp: fix cdn-dp complie warning
2017-02-07drm/exynos: fimd: Do not use HW trigger for exynos3250Hoegeun Kwon1-2/+0
Commit a6f75aa161c5 ("drm/exynos: fimd: add HW trigger support") added hardware trigger support to the FIMD controller driver. I have tested but this broke the display in at least the exynos3250 Gear 2. So until the issue is fixed, avoid using HW trigger for the exynos3250 based boards and use SW trigger as it was before the mentioned commit. Signed-off-by: Hoegeun Kwon <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos/hdmi: add bridge supportAndrzej Hajda1-10/+46
On TM2/TM2e platforms HDMI output is connected to MHL bridge SiI8620. To allow configure UltraHD modes on the bridge and to eliminate unsupported modes this bridge should be attached to drm_encoder implemented in exynos_hdmi. Changelog v1: - fix drm_attach_bridge argument. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos/decon5433: signal vblank only on odd fieldsAndrzej Hajda2-0/+8
In case of interlace mode irq is generated for odd and even fields, but vblank should be signaled only for the last emitted field. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos/decon5433: add support for interlace modesAndrzej Hajda2-13/+33
Some registers should be programmed differently in interlace mode. Additionally IP does not signal stop state properly in interlaced mode, so warning has been removed. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos/hdmi: fix PLL for 27MHz settingsAndrzej Hajda1-6/+6
Current settings for 27MHz and 27.027MHz do not work. Use the settings from vendor code instead. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos/hdmi: fix VSI infoframe registersAndrzej Hajda1-1/+2
VSI infoframe registers address space is non-contiguous, so infoframe write should be split into two chunks. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos/hdmi: add 297MHz pixel clock supportAndrzej Hajda1-0/+9
297MHz is used by Ultra HD modes. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos: g2d: change platform driver name to 'exynos-drm-g2d'Tobias Jakobi1-1/+1
The current name is 's5p-g2d', which is identical with the driver name of the old V4L2 driver in media/platform. This is probably due to the DRM driver being based on the V4L2 driver when it was initially created. Still the clashing of driver names is confusing, so rename it to something in line with the other DRM subdrivers. Signed-off-by: Tobias Jakobi <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/exynos/decon5433: configure sysreg in case of hardware triggerAndrzej Hajda1-8/+32
In case of HW trigger mode, sysreg register should be configured to enable TE functionality. The patch refactors also trigger setup function. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2017-02-07drm/rockchip: cdn-dp: fix cdn-dp complie warningMark Yao1-1/+1
fix warning: drivers/gpu/drm/rockchip/cdn-dp-reg.c:632:24: warning: 'val[1]' may be used uninitialized in this function [-Wmaybe-uninitialized] msa_misc = 2 * val[0] + 32 * val[1] + Signed-off-by: Mark Yao <[email protected]>
2017-02-07Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into ↵Dave Airlie45-556/+2712
drm-next The big things this time around are: 1) support for hw cursor on newer mdp5 devices (snapdragon 820+, tested on db820c) 2) dsi encoder cleanup 3) gpu dt bindings cleanup so we can get the gpu nodes merged upstream * 'msm-next' of git://people.freedesktop.org/~robclark/linux: (32 commits) drm/msm: return -EFAULT if copy_from_user() fails drm/msm/dsi: Add PHY/PLL for 8x96 drm/msm/dsi: Add new method to calculate 14nm PHY timings drm/msm/dsi: Move PHY operations out of host drm/msm/dsi: Reset both PHYs before clock operation for dual DSI drm/msm/dsi: Pass down use case to PHY drm/msm/dsi: Return more timings from PHY to host drm/msm/dsi: Add a PHY op that initializes version specific stuff drm/msm/dsi: Add 8x96 info in dsi_cfg drm/msm/dsi: Don't error if a DSI host doesn't have a device connected drm/msm/mdp5: Add support for legacy cursor updates drm/msm/mdp5: Refactor mdp5_plane_atomic_check drm/msm/mdp5: Add cursor planes drm/msm/mdp5: Misc cursor plane bits drm/msm/mdp5: Configure COLOR3_OUT propagation drm/msm/mdp5: Use plane helpers to configure src/dst rectangles drm/msm/mdp5: Prepare CRTC/LM for empty stages drm/msm/mdp5: Create only as many CRTCs as we need drm/msm/mdp5: cfg: Change count to unsigned int drm/msm/mdp5: Create single encoder per interface (INTF) ...
2017-02-07Merge branch 'drm-rockchip-next-2017-02-05' of ↵Dave Airlie10-4/+2872
https://github.com/markyzq/kernel-drm-rockchip into drm-next rockchip CDN-DP support. * 'drm-rockchip-next-2017-02-05' of https://github.com/markyzq/kernel-drm-rockchip: drm/rockchip: cdn-dp: don't configure hardware in mode_set drm/rockchip: cdn-dp: retry to check sink count drm/rockchip: cdn-dp: Move mutex_init to probe drm/rockchip: cdn-dp: do not use drm_helper_hpd_irq_event drm/rockchip: cdn-dp: Do not run worker while suspended drm/rockchip: cdn-dp: Load firmware if no monitor connected drm/rockchip: cdn-dp: add cdn DP support for rk3399 drm/rockchip: return ERR_PTR instead of NULL drm/rockchip: vop: make vop register setting take effect
2017-02-07Merge tag 'drm-misc-next-2017-02-03' of ↵Dave Airlie96-818/+3546
git://anongit.freedesktop.org/git/drm-misc into drm-next Final 4.11 feature pull request: - sii8520 bridge update from Andrzej - ->release callback, maybe somewhen in the future we'll even get drm_device lifetimes correct! (Chris Wilson) - drm_mm search improvements, and good docs for different search strategies now (Chris) - simplify fbdev emulation init parameters (Gabriel) - bunch of misc things all over ... and the first few patches from our small driver in drm-misc experiment: - cleanups for qxl and bochs from a few different people - dsi support for vc4 (not yet the panel driver, that's under discussion still) from Eric - meson rename to meson-drm to distinguish from other platform drivers (Neil Amstrong) * tag 'drm-misc-next-2017-02-03' of git://anongit.freedesktop.org/git/drm-misc: (47 commits) drm: kselftest for drm_mm and bottom-up allocation drm: Improve drm_mm search (and fix topdown allocation) with rbtrees drm: Fix build when FBDEV_EMULATION is disabled drm: Rely on mode_config data for fb_helper initialization drm: Provide a driver hook for drm_dev_release() drm: meson: rename driver name to meson-drm drm: meson: rename module name to meson-drm drm/bridge/sii8620: enable interlace modes drm/bridge/sii8620: enable MHL3 mode if possible drm/bridge/sii8620: add HSIC initialization code drm/bridge/sii8620: improve gen2 write burst IRQ routine drm/bridge/sii8620: send EMSC features on request drm/bridge/sii8620: rewrite hdmi start sequence drm/bridge/mhl: add MHL3 infoframe related definitions drm/bridge/sii8620: fix disconnect sequence drm/bridge/sii8620: split EDID read and write code drm/bridge/sii8620: add delay during cbus reset drm/bridge/sii8620: do not stop MHL output when TMDS input is stopped drm/bridge/sii8620: set gen2 write burst before sending MSC command drm/bridge/sii8620: abstract out sink detection code ...
2017-02-06drm/msm: return -EFAULT if copy_from_user() failsDan Carpenter1-6/+7
copy_from_user_inatomic() is actually a local function that returns -EFAULT or positive values on error. Otherwise copy_from_user() returns the number of bytes remaining to be copied. We want to return -EFAULT here. I removed an unlikely() because we just did a copy_from_user() so I don't think it can possibly make a difference. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Add PHY/PLL for 8x96Archit Taneja9-0/+1319
Extend the DSI PHY/PLL drivers to support the DSI 14nm PHY/PLL found on 8x96. These are picked up from the downstream driver. The PHY part is similar to the other DSI PHYs. The PLL driver requires some trickery so that one DSI PLL can drive both the DSIs (i.e, dual DSI mode). In the case of dual DSI mode. One DSI instance becomes the clock master, and other the clock slave. The master PLL's output (Byte and Pixel clock) is fed to both the DSI hosts/PHYs. When the DSIs are configured in dual DSI mode, the PHY driver communicates to the PLL driver using msm_dsi_pll_set_usecase() which instance is the master and which one is the slave. When setting rate, the master PLL also configures some of the slave PLL/PHY registers which need to be identical to the master's for correct dual DSI behaviour. There are 2 PLL post dividers that should have ideally been modelled as generic clk_divider clocks, but require some customization for dual DSI. In particular, when the master PLL's post-diviers are set, the slave PLL's post-dividers need to be set too. The clk_ops for these use clk_divider's helper ops and flags internally to prevent redundant code. Cc: Stephen Boyd <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Add new method to calculate 14nm PHY timingsHai Li2-1/+127
The 14nm DSI PHY on 8x96 (called PHY v2 downstream) requires a different set of calculations for computing D-PHY timing params. Create a timing_calc_v2 func for the newer v2 PHYs. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Move PHY operations out of hostHai Li8-125/+172
Since DSI PHY has been a separate platform device, it should not depend on the resources in host to be functional. This change is to trigger PHY operations in manager, instead of host, so that host and PHY can be completely separated. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Reset both PHYs before clock operation for dual DSIArchit Taneja3-15/+43
In case of dual DSI, some registers in PHY1 have been programmed during PLL0 clock's set_rate. The PHY1 reset called by host1 later will silently reset those PHY1 registers. This change is to reset and enable both PHYs before any PLL clock operation. [Originally worked on by Hai Li <[email protected]>. Fixed up by Archit Taneja <[email protected]>] Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Pass down use case to PHYHai Li4-30/+51
For some new types of DSI PHY, more settings depend on use cases controlled by DSI manager. This change allows DSI manager to setup PHY with a use case. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Return more timings from PHY to hostHai Li5-27/+41
The DSI host is required to configure more timings calculated in PHY. By introducing a shared structure, this change allows more timing information passed from PHY to host. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Add a PHY op that initializes version specific stuffArchit Taneja5-9/+30
Create an init() op for dsi_phy which sets up things specific to a given DSI PHY. The dsi_phy driver probe expects every DSI version to get a "dsi_phy_regulator" mmio base. This isn't the case for 8x96. Creating an init() op will allow us to accommodate such differences. Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Add 8x96 info in dsi_cfgArchit Taneja2-0/+26
Add 8x96 DSI data in dsi_cfg. The downstream kernel's dsi_host driver enables core_mmss_clk. We're seeing some branch clock warnings on 8x96 when enabling this. There doesn't seem to be any negative effect with not enabling this clock, so use it once we figure out why we get the warnings. Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/dsi: Don't error if a DSI host doesn't have a device connectedArchit Taneja1-5/+5
The driver returns an error if a DSI DT node is populated, but no device is connected to it or if the data-lane map isn't present. Ideally, such a DSI node shouldn't be probed at all (i.e, its status should be set to "disabled in DT"), but there isn't any harm in registering the DSI device even if it doesn't have a bridge/panel connected to it. Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/mdp5: Add support for legacy cursor updatesArchit Taneja3-3/+115
This code has been more or less picked up from the vc4 and intel implementations of update_plane() funcs for cursor planes. The update_plane() func is usually the drm_atomic_helper_update_plane func that will issue an atomic commit with the plane updates. Such commits are not intended to be done faster than the vsync rate. The legacy cursor userspace API, on the other hand, expects the kernel to handle cursor updates immediately. Create a fast path in update_plane, which updates the cursor registers and flushes the configuration. The fast path is taken when there is only a change in the cursor's position in the crtc, or a change in the cursor's crop co-ordinates. For anything else, we go via the slow path. We take the slow path even when the fb changes, and when there is currently no fb tied to the plane. This should hopefully ensure that we always take a slow path for every new fb. This in turn should ensure that the fb is pinned/prepared. Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2017-02-06drm/msm/mdp5: Refactor mdp5_plane_atomic_checkArchit Taneja1-12/+20
In mdp5_plane_atomic_check, we get crtc_state from drm_plane_state. Later, for cursor planes, we'll populate the update_plane() func that takes a fast asynchronous path to implement cursor movements. There, we would need to call a similar atomic_check func to validate the plane state, but crtc_state would need to be derived differently. Refactor mdp5_plane_atomic_check to mdp5_plane_atomic_check_with_state such that the latter takes crtc_state as an argument. This is similar to what the intel driver has done for async cursor updates. Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Rob Clark <[email protected]>