summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rockchip
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'imx-drm-next-20160301' of git://git.pengutronix.de/git/pza/linux ↵Dave Airlie2016-03-024-34/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next imx-drm vblank IRQ control, fence support, and of endpoint helpers - Add and make use of drm_of_active_endpoint helpers - Silence a noisy dev_info into a dev_dbg - Stop touching primary fb on pageflips - Track flip state explicitly - Keep GEM buffer objects referenced while scanout is active - Implement fence sync by deferring flips to a workqueue for dma-bufs with pending fences - Actually disable vblank IRQs while they are not needed * tag 'imx-drm-next-20160301' of git://git.pengutronix.de/git/pza/linux: drm/imx: only enable vblank IRQs when needed drm/imx: implement fence sync drm/imx: keep GEM object referenced as long as scanout is active drm/imx: track flip state explicitly drm/imx: don't touch primary fb on pageflip drm/imx: ipuv3 plane: Replace dev_info with dev_dbg if a plane's CRTC changes gpu: ipu-v3: ipu-dc: Simplify display controller microcode setup drm/rockchip: remove rockchip_drm_encoder_get_mux_id drm/imx: remove imx_drm_encoder_get_mux_id drm: add drm_of_encoder_active_endpoint helpers
| * drm/rockchip: remove rockchip_drm_encoder_get_mux_idPhilipp Zabel2016-03-014-34/+2
| | | | | | | | | | | | | | | | | | | | | | | | It is replaced by drm_of_encoder_active_endpoint_id. Suggested-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Yakir Yang <ykk@rock-chips.com> [for dw_hdmi-rockchip] Acked-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* | Merge branch 'drm-rockchip-next-2016-02-18' of ↵Dave Airlie2016-02-194-0/+1309
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/markyzq/kernel-drm-rockchip into drm-next add Innosilicon HDMI support. * 'drm-rockchip-next-2016-02-18' of https://github.com/markyzq/kernel-drm-rockchip: dt-bindings: add document for Innosilicon HDMI on Rockchip platform drm/rockchip: hdmi: add Innosilicon HDMI support
| * | drm/rockchip: hdmi: add Innosilicon HDMI supportYakir Yang2016-02-184-0/+1309
| |/ | | | | | | | | | | | | | | | | The Innosilicon HDMI is a low power HDMI 1.4 transmitter IP, and it have been integrated on some rockchip CPUs (like RK3036, RK312x). Signed-off-by: Yakir Yang <ykk@rock-chips.com> Tested-by: Heiko Stuebner <heiko@sntech.de>
* / drm/rockchip: removed optional dummy encoder mode_fixup function.Carlos Palminha2016-02-161-8/+0
|/ | | | | | | | | | | | | | mode_fixup function for encoder drivers became optional with patch http://patchwork.freedesktop.org/patch/msgid/1455106522-32307-1-git-send-email-palminha@synopsys.com This patch set nukes all the dummy mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha@synopsys.com> Acked-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/cae559aa2c04a906c21ed5ebe4861f92440e6910.1455540137.git.palminha@synopsys.com
* drm/rockchip: respect CONFIG_DRM_FBDEV_EMULATIONJohn Keeping2016-01-222-1/+13
| | | | | | | If DRM_FBDEV_EMULATION is not selected in the config then we can save a bit of space by not including the framebuffer code. Signed-off-by: John Keeping <john@metanate.com>
* drm/rockchip: fix wrong pitch/size using on gemMark Yao2016-01-211-7/+2
| | | | | | | | | | | | | | | | args->pitch and args->size may not be set by userspace, sometimes userspace only malloc args and not memset args to zero, then args->pitch and args->size is random, it is very danger to use pitch/size on gem. pitch's type is u32, and min_pitch's type is int, example, pitch is 0xffffffff, then pitch < min_pitch return true, then gem will alloc very very big bufffer, it would eat all the memory and cause kernel crash. Stop using pitch/size from args, calc them from other args. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: explain why we can't wait_for_vblanksJohn Keeping2016-01-201-0/+15
| | | | Signed-off-by: John Keeping <john@metanate.com>
* drm/rockchip: don't wait for vblank if fb hasn't changedJohn Keeping2016-01-201-2/+6
| | | | | | | | | | | | | | | | | | | | As commented in drm_atomic_helper_wait_for_vblanks(), userspace relies on cursor ioctls being unsynced. Converting the rockchip driver to atomic has significantly impacted cursor performance by making every cursor update wait for vblank. By skipping the vblank sync when the framebuffer has not changed (as is done in drm_atomic_helper_wait_for_vblanks()) we can avoid this for the common case of moving the cursor and only need to delay the cursor ioctl when the cursor icon changes. We cannot add the check on legacy_cursor_update since that results in the cursor bo being unreferenced while the hardware may still be reading it. Fully supporting unsynced cursor updates is left for the future when the atomic helper framework supports async updates. Signed-off-by: John Keeping <john@metanate.com> Tested-by: Heiko Stuebner <heiko@sntech.de>
* drm/rockchip/dsi: fix handling mipi_dsi_pixel_format_to_bpp resultAndrzej Hajda2016-01-181-1/+2
| | | | | | | | | | | The function can return negative value so it should be assigned to signed variable. The problem has been detected using patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Chris Zhong <zyw@rock-chips.com>
* drm/rockchip: vop: fix mask when updating interruptsJohn Keeping2016-01-181-7/+9
| | | | | | | | | | | | Commit dbb3d94 (drm/rockchip: vop: move interrupt registers into vop_data) introduced new macros for updating the interrupt control registers but these always use the mask from the register definition without refining it for the particular bits that are being changed. This means that whenever we enable/disable a particular interrupt we end up disabling all of the others as a side effect. Signed-off-by: John Keeping <john@metanate.com>
* drm/rockchip: cleanup unnecessary export symbolMark Yao2016-01-182-5/+0
| | | | | | | | | | | | | | Now rockchip_drm_vop.c is build into rockchipdrm.ko, so no need to export following symbol anymore: rockchip_drm_dma_attach_device rockchip_drm_dma_detach_device rockchip_drm_dma_attach_device rockchip_drm_dma_detach_device rockchip_register_crtc_funcs rockchip_unregister_crtc_funcs rockchip_fb_get_gem_obj Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: Don't build rockchip_drm_vop as modulesMark Yao2016-01-181-3/+2
| | | | | | | rockchip_drm_vop's module init had moved to rockchip_vop_reg.c so no need to build rockchip_drm_vop.ko Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm: rockchip: Support Synopsys DW MIPI DSIChris Zhong2016-01-064-0/+1208
| | | | | | | | Add support for Synopsys DesignWare MIPI DSI controller which is embedded in the rk3288 SoCs. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Acked-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: return a true clock rate to adjusted_modeChris Zhong2016-01-061-0/+5
| | | | | | | | | | Since the mipi dsi driver need to use the clock of vop to make the calculation of Blanking. But sometimes the clock driver can not set a accurate clock_rate for vop, get it by clk_round_rate before mode_set, so we can get the true value. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Acked-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: export vop_component_ops to modulesStephen Rothwell2015-12-311-0/+1
| | | | | | | Fixes: a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/rockchip: vop: add rk3036 vop supportMark Yao2015-12-282-203/+336
| | | | | | | | | | | | RK3036 registers layout is quite difference with rk3288 layout, The IC design with different framework, rk3036 vop is VOP LITE, and rk3288 is VOP FULL. RK3036 support two overlay plane and one hwc plane, max output resolution is 1080p. it support IOMMU, and its IOMMU same as rk3288's. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: spilt scale regstersMark Yao2015-12-283-18/+47
| | | | | | | | There are two version scale control register found on vop, scale full version found on rk3288, support extension registers. and scale little version found on rk3036, only support common scale. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: spilt register related into rockchip_reg_vop.cMark Yao2015-12-285-429/+468
| | | | | | | No functional updates. Spilt register related into another file would be nice to multi vop driver, Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: move interrupt registers into vop_dataMark Yao2015-12-281-12/+69
| | | | | | Move interrupt registers into vop_data, so it can use at multi-vop driver Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: merge vop cfg_done into vop_dataMark Yao2015-12-281-5/+8
| | | | | | Move cfg_done register into vop_data, so it can use at multi-vop driver Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: dw_hdmi: use encoder enable functionMark Yao2015-12-281-9/+5
| | | | | | encoder.enable is more compatible to atomic api than encoder.prepare/commit Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: direct config connecter gate and out_modeMark Yao2015-12-281-21/+18
| | | | | | | | Both connecter gate and out_mode are not conflict with mode set configure. Direct setting connecter gate and out_mode, that allow connector do rockchip_drm_crtc_mode_config after mode set. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: support atomic asynchronous commitMark Yao2015-12-283-13/+54
| | | | | | | If drm core requests a async commit, rockchip_drm_atomic_commit will schedule a work task to update later. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: Optimization vop mode setMark Yao2015-12-281-16/+35
| | | | | | | | | | | | | | Rk3288 vop timing registers is immediately register, when configure timing on display active time, will cause tearing. use dclk reset is not a good idea to avoid this tearing. we can avoid tearing by using standby register. Vop standby register will take effect at end of current frame, and go back to work immediately when exit standby. So we can use standby register to protect this context. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: Convert to support atomic APIMark Yao2015-12-284-397/+363
| | | | | | | Rockchip vop not support hw vblank counter, needed check the committed register if it's really take effect. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: replace dpms with enable/disableMark Yao2015-12-281-33/+4
| | | | | | | For vop, power by enable/disable is more suitable then legacy dpms function, and enable/disable more closely to the new atomic API. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: Use new vblank api drm_crtc_vblank_*Mark Yao2015-12-283-23/+21
| | | | | | | No functional update, drm_vblank_* is the legacy version of drm_crtc_vblank_*. and use new api make driver more clean. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm: use dev_name as default unique name in drm_dev_alloc()Nicolas Iooss2015-12-151-4/+0
| | | | | | | | | | | | | | | | | | The following code pattern exists in some DRM drivers: ddev = drm_dev_alloc(&driver, parent_dev); drm_dev_set_unique(ddev, dev_name(parent_dev)); (Sometimes dev_name(ddev->dev) is used, which is the same.) As suggested in http://lists.freedesktop.org/archives/dri-devel/2015-December/096441.html, the unique name of a new DRM device can be set as dev_name(parent_dev) when parent_dev is not NULL (vgem is a special case). Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: make drm_dev_set_unique() not use a format stringNicolas Iooss2015-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | drm_dev_set_unique() uses a format string to define the unique name of a device. This feature is not used as currently all the calls to this function either use "%s" as a format string or directly use dev_name(). Even though this second kind of call does not introduce security problems, because there cannot be "%" characters in dev_name() results, gcc issues a warning when building with -Wformat-security flag ("warning: format string is not a string literal (potentially insecure)"). This warning is useful to find real bugs like the one fixed by commit 3958b79266b1 ("configfs: fix kernel infoleak through user-controlled format string"). False positives which do not bring an extra value make the work of finding real bugs harder. Therefore remove the format-string feature from drm_dev_set_unique(). Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Link: http://patchwork.freedesktop.org/patch/msgid/1449829228-4425-1-git-send-email-nicolas.iooss_linux@m4x.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/rockchip: Constify function pointer structsVille Syrjälä2015-12-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Moves a bunch of junk to .rodata from .data. drivers/gpu/drm/rockchip/dw_hdmi-rockchip.ko: -.rodata 772 +.rodata 828 -.data 148 +.data 92 drivers/gpu/drm/rockchip/rockchipdrm.ko: -.rodata 748 +.rodata 760 -.data 448 +.data 436 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-25-git-send-email-boris.brezillon@free-electrons.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: Pass 'name' to drm_encoder_init()Ville Syrjälä2015-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4; @@ drm_encoder_init(E1, E2, E3, E4 + ,NULL ) v2: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449670818-2966-1-git-send-email-ville.syrjala@linux.intel.com
* drm: Pass 'name' to drm_universal_plane_init()Ville Syrjälä2015-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with coccinelle for the most part. It choked on msm/mdp/mdp5/mdp5_plane.c like so: "BAD:!!!!! enum drm_plane_type type;" No idea how to deal with that, so I just fixed that up by hand. Also it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. I didn't convert drm_plane_init() since passing the varargs through would mean either cpp macros or va_list, and I figured we don't care about these legacy functions enough to warrant the extra pain. @@ typedef uint32_t; identifier dev, plane, possible_crtcs, funcs, formats, format_count, type; @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, unsigned long possible_crtcs, const struct drm_plane_funcs *funcs, const uint32_t *formats, unsigned int format_count, enum drm_plane_type type + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, plane, possible_crtcs, funcs, formats, format_count, type; @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, unsigned long possible_crtcs, const struct drm_plane_funcs *funcs, const uint32_t *formats, unsigned int format_count, enum drm_plane_type type + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4, E5, E6, E7; @@ drm_universal_plane_init(E1, E2, E3, E4, E5, E6, E7 + ,NULL ) v2: Split crtc and plane changes apart Pass NUL for no-name instead of "" Leave drm_plane_init() alone v3: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449670795-2853-1-git-send-email-ville.syrjala@linux.intel.com
* drm: Pass 'name' to drm_crtc_init_with_planes()Ville Syrjälä2015-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. I didn't convert drm_crtc_init() since passing the varargs through would mean either cpp macros or va_list, and I figured we don't care about these legacy functions enough to warrant the extra pain. @@ identifier dev, crtc, primary, cursor, funcs; @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, struct drm_plane *primary, struct drm_plane *cursor, const struct drm_crtc_funcs *funcs + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, crtc, primary, cursor, funcs; @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, struct drm_plane *primary, struct drm_plane *cursor, const struct drm_crtc_funcs *funcs + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4, E5; @@ drm_crtc_init_with_planes(E1, E2, E3, E4, E5 + ,NULL ) v2: Split crtc and plane changes apart Pass NULL for no-name instead of "" Leave drm_crtc_init() alone v3: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449670771-2751-1-git-send-email-ville.syrjala@linux.intel.com
* Back merge tag 'v4.4-rc4' into drm-nextDave Airlie2015-12-082-25/+19
|\ | | | | | | | | We've picked up a few conflicts and it would be nice to resolve them before we move onwards.
| * drm/rockchip: Use CRTC vblank event interfaceDaniel Stone2015-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing -1 as the pipe for vblank events now triggers a WARN_ON, but had previously made multi-screen unusable anyway. Pass the correct pipe to the event-send function, and use the new API to make this a bit easier for us. Fixes WARN present since cc1ef118fc for every pageflip event sent: [ 209.549969] ------------[ cut here ]------------ [ 209.554592] WARNING: CPU: 3 PID: 238 at drivers/gpu/drm/drm_irq.c:924 drm_vblank_count_and_time+0x80/0x88 [drm]() [ 209.564832] Modules linked in: [...] [ 209.612401] CPU: 3 PID: 238 Comm: irq/41-ff940000 Tainted: G W 4.3.0-rc6+ #71 [ 209.620647] Hardware name: Rockchip (Device Tree) [ 209.625348] [<c001bb80>] (unwind_backtrace) from [<c001615c>] (show_stack+0x20/0x24) [ 209.633079] [<c001615c>] (show_stack) from [<c02b2c50>] (dump_stack+0x8c/0x9c) [ 209.640289] [<c02b2c50>] (dump_stack) from [<c0052e88>] (warn_slowpath_common+0x94/0xc4) [ 209.648364] [<c0052e88>] (warn_slowpath_common) from [<c0052f74>] (warn_slowpath_null+0x2c/0x34) [ 209.657139] [<c0052f74>] (warn_slowpath_null) from [<bf17dc30>] (drm_vblank_count_and_time+0x80/0x88 [drm]) [ 209.666875] [<bf17dc30>] (drm_vblank_count_and_time [drm]) from [<bf17e484>] (drm_send_vblank_event+0x74/0x7c [drm]) [ 209.677385] [<bf17e484>] (drm_send_vblank_event [drm]) from [<bf4c1144>] (vop_win_state_complete+0x4c/0x70 [rockchip_drm_vop]) [ 209.688757] [<bf4c1144>] (vop_win_state_complete [rockchip_drm_vop]) from [<bf4c3bdc>] (vop_isr_thread+0x170/0x1d4 [rockchip_drm_vop]) [ 209.700822] [<bf4c3bdc>] (vop_isr_thread [rockchip_drm_vop]) from [<c00ab93c>] (irq_thread_fn+0x2c/0x50) [ 209.710284] [<c00ab93c>] (irq_thread_fn) from [<c00abcac>] (irq_thread+0x13c/0x188) [ 209.717927] [<c00abcac>] (irq_thread) from [<c00723c8>] (kthread+0xec/0x104) [ 209.724965] [<c00723c8>] (kthread) from [<c0011638>] (ret_from_fork+0x14/0x3c) [ 209.732171] ---[ end trace 0690bc604f5d535d ]--- Signed-off-by: Daniel Stone <daniels@collabora.com> Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Cc: Thierry Reding <treding@nvidia.com> Cc: Heiko Stuebner <heiko@sntech.de> Tested-By: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Thierry Reding <treding@nvidia.com>
| * drm/rockchip: Fix module autoload for OF platform driverLuis de Bethencourt2015-12-021-0/+1
| | | | | | | | | | | | | | This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
| * drm/rockchip: vop: fix window origin calculationDominik Behr2015-12-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | VOP_WINx_DSP_ST does not require subtracting 1 from the values written to it. It actually causes the screen to be shifted by one pixel. Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Tested-by: Yakir Yang <ykk@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Dominik Behr <dbehr@chromium.org> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
| * drm/rockchip: unset pgoff when mmap'ing gemsHeiko Stuebner2015-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit 371f0f085f629 ("ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()") introduced offset-checking for mappings, which collides with the fake-offset the drm sets for gems. Other drm-drivers set this offset to 0 before doing the mapping, so this looks like the correct way to go for rockchip as well. Fixes: 371f0f085f629 ("ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()") Signed-off-by: Heiko Stuebner <heiko@sntech.de>
| * drm/rockchip: vop: Correct enabled clocks during setupSjoerd Simons2015-12-011-22/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing the initial setup both the hclk and the aclk need to be enabled otherwise the board will simply hang. This only occurs when building the vop driver as a module, when its built-in the initial setup happens to run before the clock framework shuts of unused clocks (including the aclk). While there also switch to doing prepare and enable in one step rather then separate steps to reduce the amount of code required. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Acked-by: Mark Yao <mark.yao@rock-chips.com> Tested-by: Yakir Yang <ykk@rock-chips.com> Tested-by: Romain Perier <romain.perier@gmail.com>
* | drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()Ville Syrjälä2015-11-242-4/+4
|/ | | | | | | | | | Drivers shouldn't clobber the passed in addfb ioctl parameters. i915 was doing just that. To prevent it from happening again, pass the struct around as const, starting all the way from internal_framebuffer_create(). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* Revert "drm/rockchip: Convert the probe function to the generic ↵Mark Yao2015-11-131-6/+75
| | | | | | | | | | | | drm_of_component_probe()" This reverts commit 52f5eb60940de889ce98a876f6933b574ead3225. Rockchip drm can't work with generic drm_of_component_probe now Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/rockchip: Convert the probe function to the generic drm_of_component_probe()Liviu Dudau2015-10-201-75/+6
| | | | | | | | Use the generic drm_of_component_probe() function to probe for components. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> Link: http://patchwork.freedesktop.org/patch/msgid/1445332995-11212-4-git-send-email-Liviu.Dudau@arm.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/gem: Drop struct_mutex requirement from drm_gem_mmap_objDaniel Vetter2015-10-161-3/+0
| | | | | | | | | | | | | | | | | | Since commit 131e663bd6f1055caaff128f9aa5071d227eeb72 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Thu Jul 9 23:32:33 2015 +0200 drm/gem: rip out drm vma accounting for gem mmaps there is no need for this any more. v2: Fixup compile noise spotted by 0-day build. Link: http://mid.gmane.org/1444894601-5200-9-git-send-email-daniel.vetter@ffwll.ch Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* drm: Stop using drm_vblank_count() as the hw frame counterVille Syrjälä2015-10-071-1/+1
| | | | | | | | | | | | | | | | | drm_vblank_count() returns the software counter. We should not pretend it's the hw counter since we use the hw counter to figuere out what the software counter value should be. So instead provide a new function drm_vblank_no_hw_counter() for drivers that don't have a real hw counter. The new function simply returns 0, which is about the only thing it can do. Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com> [danvet: s/int pipe/unsigned int pipe/ to follow Thierry's interface change.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/irq: Use unsigned int pipe in public APIThierry Reding2015-10-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This continues the pattern started in commit cc1ef118fc09 ("drm/irq: Make pipe unsigned and name consistent"). This is applied to the public APIs and driver callbacks, so pretty much all drivers need to be updated to match the new prototypes. Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Inki Dae <inki.dae@samsung.com> Cc: Jianwei Wang <jianwei.wang.chn@gmail.com> Cc: Alison Wang <alison.wang@freescale.com> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Rob Clark <robdclark@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/rockchip: vop: support plane scaleMark Yao2015-08-262-2/+284
| | | | | | | Win_full support 1/8 to 8 scale down/up engine, support all format scale. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: restore vop registers when resumeMark Yao2015-08-261-0/+1
| | | | | | | The registers will be reset to default values when whole power domain off, so restore registers from regsbak. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: Default enable win2/3 area0 bitMark Yao2015-08-261-0/+6
| | | | | | | | Win2/3 support multiple area function, but we haven't found a suitable way to use it yet, so let's just use them as other windows with only area 0 enabled. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
* drm/rockchip: vop: Add yuv plane supportMark Yao2015-08-261-2/+54
| | | | | | vop support yuv with NV12, NV16 and NV24, only 2 plane yuv. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>