summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti
AgeCommit message (Collapse)AuthorFilesLines
2017-02-10drm/sti: debug fps resetVincent Abriou1-0/+2
Reset the fps debug information when 'fps_show' is updated. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
2017-02-10drm/sti: hdmi: automatically check DVI/HDMI modeVincent Abriou2-40/+8
Remove the hdmi_mode_property and use drm_detect_hdmi_monitor function to check whether the connected monitor is HDMI capable or DVI only. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: unbind all components while driver cleanupVincent Abriou1-0/+1
Unbind all the components when the STI driver is unregistered. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: do not post GDP command if no updateVincent Abriou1-0/+15
Do not process update requests with unmodified parameters. This typically happens when the driver is called with legacy (non-atomic) IOCTL : in that case atomic_update() is called multiple times with the same parameters. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: do not set gdp pixel clock rate if mode is not setVincent Abriou1-1/+1
Fix a division by 0 case : in some cases, when the GDP plane is being disabled atomic_check() is called with "mode->clock = 0". In that case, do not set parent and pixel clock rate. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: enable gdp pixel clock in atomic_updateVincent Abriou1-38/+32
Set gdp pix clock rate and parent in atomic_check function and enable it in the atomic_update only the first time. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: remove deprecated legacy vtg slaveVincent Abriou1-44/+14
stih416 chip family is no more supported in Linux v4.9. It is then useless to keep vtg slave field since it not used at all for the stih407/10 chip family supported by sti driver. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: remove deprecated sink_term configVincent Abriou1-7/+0
stih416 chip family is no more supported in Linux v4.9. Then sink_term config becomes useless. The field of the register it was referring to is tag as reserved for stih410 chip family. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: do not check hw scaling if mode is not setFabien DESSENNE1-3/+3
Fix a division by 0 case : in some cases, when the HQVDP plane is being disabled atomic_check() is called with "mode->clock = 0". In that case, do not check for scaling capabilities. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: Fix up crtc_state->event handlingFabien DESSENNE2-34/+14
Use drm-core to handle event. This is required to be able to use the nonblocking helpers. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-10drm/sti: use atomic_helper for commitFabien DESSENNE2-84/+6
Since nonblocking atomic commits are now supported, the driver can now use drm_atomic_helper_commit(). Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2017-02-02drm: Rely on mode_config data for fb_helper initializationGabriel Krisman Bertazi1-1/+1
Instead of receiving the num_crts as a parameter, we can read it directly from the mode_config structure. I audited the drivers that invoke this helper and I believe all of them initialize the mode_config struct accordingly, prior to calling the fb_helper. I used the following coccinelle hack to make this transformation, except for the function headers and comment updates. The first and second rules are split because I couldn't find a way to remove the unused temporary variables at the same time I removed the parameter. // <smpl> @r@ expression A,B,D,E; identifier C; @@ ( - drm_fb_helper_init(A,B,C,D) + drm_fb_helper_init(A,B,D) | - drm_fbdev_cma_init_with_funcs(A,B,C,D,E) + drm_fbdev_cma_init_with_funcs(A,B,D,E) | - drm_fbdev_cma_init(A,B,C,D) + drm_fbdev_cma_init(A,B,D) ) @@ expression A,B,C,D,E; @@ ( - drm_fb_helper_init(A,B,C,D) + drm_fb_helper_init(A,B,D) | - drm_fbdev_cma_init_with_funcs(A,B,C,D,E) + drm_fbdev_cma_init_with_funcs(A,B,D,E) | - drm_fbdev_cma_init(A,B,C,D) + drm_fbdev_cma_init(A,B,D) ) @@ identifier r.C; type T; expression V; @@ - T C; <... when != C - C = V; ...> // </smpl> Changes since v1: - Rebased on top of the tip of drm-misc-next. - Remove mention to sti since a proper fix got merged. Suggested-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170202162640.27261-1-krisman@collabora.co.uk
2017-02-01Merge tag 'drm-misc-next-2017-01-30' of ↵Dave Airlie5-82/+6
git://anongit.freedesktop.org/git/drm-misc into drm-next Another round of -misc stuff: - Noralf debugfs cleanup cleanup (not yet everything, some more driver patches awaiting acks). - More doc work. - edid/infoframe fixes from Ville. - misc 1-patch fixes all over, as usual Noralf needs this for his tinydrm pull request. * tag 'drm-misc-next-2017-01-30' of git://anongit.freedesktop.org/git/drm-misc: (48 commits) drm/vc4: Remove vc4_debugfs_cleanup() dma/fence: Export enable-signaling tracepoint for emission by drivers drm/tilcdc: Remove tilcdc_debugfs_cleanup() drm/tegra: Remove tegra_debugfs_cleanup() drm/sti: Remove drm_debugfs_remove_files() calls drm/radeon: Remove drm_debugfs_remove_files() call drm/omap: Remove omap_debugfs_cleanup() drm/hdlcd: Remove hdlcd_debugfs_cleanup() drm/etnaviv: Remove etnaviv_debugfs_cleanup() drm/etnaviv: allow build with COMPILE_TEST drm/amd/amdgpu: Remove drm_debugfs_remove_files() call drm/prime: Clarify DMA-BUF/GEM Object lifetime drm/ttm: Make sure BOs being swapped out are cacheable drm/atomic: Remove drm_atomic_debugfs_cleanup() drm: drm_minor_register(): Clean up debugfs on failure drm: debugfs: Remove all files automatically on cleanup drm/fourcc: add vivante tiled layout format modifiers drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F drm/edid: Set AVI infoframe Q even when QS=0 drm/edid: Introduce drm_hdmi_avi_infoframe_quant_range() ...
2017-01-27drm/sti: Remove drm_debugfs_remove_files() callsNoralf Trønnes5-82/+6
drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so it's not necessary to call drm_debugfs_remove_files(). Additionally it uses debugfs_remove_recursive() to clean up the debugfs files, so no need for adding fake drm_info_node entries. Cc: benjamin.gaignard@linaro.org Cc: vincent.abriou@st.com Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Vincent Abriou <vincent.abriou@st.com> Tested-by: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170126225621.12314-14-noralf@tronnes.org
2017-01-27drm/sti: Fix compilation failure for drm_framebuffer.pixel_formatChris Wilson1-1/+1
drivers/gpu/drm/sti/sti_plane.c:76:33: error: ‘struct drm_framebuffer’ has no member named ‘pixel_format’; did you mean ‘format’? I didn't look to hard at the casting to a char * and just did a mechanical transformation of s/pixel_format/format->format/ as given in commit 438b74a5497c ("drm: Nuke fb->pixel_format"). Fixes: 438b74a5497c ("drm: Nuke fb->pixel_format") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-01-23Merge tag 'sti-drm-next-2017-01-06' of https://github.com/vinceab/linux into ↵Dave Airlie9-350/+154
drm-next stih410 cleanup, create fbdev at binding, HQVDP fixes. * tag 'sti-drm-next-2017-01-06' of https://github.com/vinceab/linux: drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache drm/sti: remove deprecated sti_vtac.c file drm/sti: create fbdev at binding drm/sti: update fps debugfs entries drm/sti: do not post HQVDP command if no update drm/sti: load XP70 firmware only once drm/sti: allow audio playback on HDMI even if disabled.
2017-01-06drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocacheArvind Yadav1-0/+4
Here, If devm_ioremap_nocache will fail. It will return NULL. Kernel can run into a NULL-pointer dereference. This error check will avoid NULL pointer dereference. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2017-01-06drm/sti: remove deprecated sti_vtac.c fileVincent Abriou4-226/+0
stih416 chip family is no more supported in Linux v4.9. It is then useless to keep sti_vtac.c file since it not used at all for the stih407/10 chip family supported by sti driver. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-01-06drm/sti: create fbdev at bindingVincent Abriou1-13/+14
Do not wait for a hot plug event to create fbdev. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-01-06drm/sti: update fps debugfs entriesVincent Abriou2-5/+14
This update allows to have a clearer fps log trace by adding information about plane size and plane pixel format. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
2017-01-06drm/sti: do not post HQVDP command if no updateFabien DESSENNE1-0/+15
Do not process update requests with unmodified parameters. Since the HQVDP command queue is limited to 2, we shall take care of not posting unneeded commands, which would abusively fill the command queue leading to frame update skip. This typically happens when the driver is called with legacy (non-atomic) IOCTL : in that case atomic_update() is called multiple times with the same parameters. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2017-01-06drm/sti: load XP70 firmware only onceFabien DESSENNE1-2/+6
When a plane is enabled, after having been disabled, do not reload XP70 firmware again, but only register VTG again Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2017-01-06drm/sti: allow audio playback on HDMI even if disabled.Arnaud Pouliquen1-104/+101
This fix allows to play audio while HDMI is disconnected. When HDMI is disable, audio configuration is stored and samples are dropped (by HDMI IP). When HDMI is enabled, audio HDMI configuration is applied and samples are outputted on HDMI wire. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-12-18drm: bridge: Link encoder and bridge in core codeLaurent Pinchart3-6/+3
Instead of linking encoders and bridges in every driver (and getting it wrong half of the time, as many drivers forget to set the drm_bridge encoder pointer), do so in core code. The drm_bridge_attach() function needs the encoder and optional previous bridge to perform that task, update all the callers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Stefan Agner <stefan@agner.ch> # For DCU Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> # For atmel-hlcdc Acked-by: Vincent Abriou <vincent.abriou@st.com> # For STI Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> # For sun4i Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com> # For hisilicon Acked-by: Jyri Sarha <jsarha@ti.com> # For tilcdc Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com
2016-12-15drm: Nuke fb->pixel_formatVille Syrjälä2-5/+5
Replace uses of fb->pixel_format with fb->format->format. Less duplicated information is a good thing. Note that coccinelle failed to eliminate the "/* fourcc format */" comment from drm_framebuffer.h, so I had to do that part manually. @@ struct drm_framebuffer *FB; expression E; @@ drm_helper_mode_fill_fb_struct(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ i9xx_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ ironlake_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ skylake_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *a; struct drm_framebuffer b; @@ ( - a->pixel_format + a->format->format | - b.pixel_format + b.format->format ) @@ struct drm_plane_state *a; struct drm_plane_state b; @@ ( - a->fb->pixel_format + a->fb->format->format | - b.fb->pixel_format + b.fb->format->format ) @@ struct drm_crtc *CRTC; @@ ( - CRTC->primary->fb->pixel_format + CRTC->primary->fb->format->format | - CRTC->primary->state->fb->pixel_format + CRTC->primary->state->fb->format->format ) @@ struct drm_mode_set *set; @@ ( - set->fb->pixel_format + set->fb->format->format | - set->crtc->primary->fb->pixel_format + set->crtc->primary->fb->format->format ) @@ @@ struct drm_framebuffer { ... - uint32_t pixel_format; ... }; v2: Fix commit message (Laurent) Rebase due to earlier removal of many fb->pixel_format uses, including the 'fb->format = drm_format_info(fb->format->format);' snafu v3: Adjusted the semantic patch a bit and regenerated due to code changes Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: http://patchwork.freedesktop.org/patch/msgid/1481751175-18463-1-git-send-email-ville.syrjala@linux.intel.com
2016-12-15drm: Replace drm_format_plane_cpp() with fb->format->cpp[]Ville Syrjälä1-1/+1
Replace drm_format_plane_cpp(fb->pixel_format) with just fb->format->cpp[]. Avoids the expensive format info lookup. @@ struct drm_framebuffer *a; struct drm_framebuffer b; expression E; @@ ( - drm_format_plane_cpp(a->pixel_format, E) + a->format->cpp[E] | - drm_format_plane_cpp(b.pixel_format, E) + b.format->cpp[E] ) @@ struct drm_plane_state *a; struct drm_plane_state b; expression E; @@ ( - drm_format_plane_cpp(a->fb->pixel_format, E) + a->fb->format->cpp[E] | - drm_format_plane_cpp(b.fb->pixel_format, E) + b.fb->format->cpp[E] ) @@ struct drm_framebuffer *a; identifier T; expression E; @@ T = a->pixel_format <+... - drm_format_plane_cpp(T, E) + a->format->cpp[E] ...+> @@ struct drm_framebuffer b; identifier T; expression E; @@ T = b.pixel_format <+... - drm_format_plane_cpp(T, E) + b.format->cpp[E] ...+> v2: Rerun spatch due to code changes Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: http://patchwork.freedesktop.org/patch/msgid/1481751057-18123-1-git-send-email-ville.syrjala@linux.intel.com
2016-12-01drm: Make the connector .detect() callback optionalLaurent Pinchart1-7/+0
Many drivers (21 to be exact) create connectors that are always connected (for instance to an LVDS or DSI panel). Instead of forcing them to implement a dummy .detect() handler, make the callback optional and consider the connector as always connected in that case. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jyri Sarha <jsarha@ti.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> [seanpaul fixed small conflict in rcar-du/rcar_du_lvdscon.c] Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-11-11Merge tag 'topic/drm-misc-2016-11-10' of ↵Dave Airlie1-2/+0
git://anongit.freedesktop.org/drm-intel into drm-next - better atomic state debugging from Rob - fence prep from gustavo - sumits flushed out his backlog of pending dma-buf/fence patches from various people - drm_mm leak debugging plus trying to appease Kconfig (Chris) - a few misc things all over * tag 'topic/drm-misc-2016-11-10' of git://anongit.freedesktop.org/drm-intel: (35 commits) drm: Make DRM_DEBUG_MM depend on STACKTRACE_SUPPORT drm/i915: Restrict DRM_DEBUG_MM automatic selection drm: Restrict stackdepot usage to builtin drm.ko drm/msm: module param to dump state on error irq drm/msm/mdp5: add atomic_print_state support drm/atomic: add debugfs file to dump out atomic state drm/atomic: add new drm_debug bit to dump atomic state drm: add helpers to go from plane state to drm_rect drm: add helper for printing to log or seq_file drm: helper macros to print composite types reservation: revert "wait only with non-zero timeout specified (v3)" v2 drm/ttm: fix ttm_bo_wait dma-buf/fence: revert "don't wait when specified timeout is zero" (v2) dma-buf/fence: make timeout handling in fence_default_wait consistent (v2) drm/amdgpu: add the interface of waiting multiple fences (v4) dma-buf: return index of the first signaled fence (v2) MAINTAINERS: update Sync File Framework files dma-buf/sw_sync: put fence reference from the fence creation dma-buf/sw_sync: mark sync_timeline_create() static drm: Add stackdepot include for DRM_DEBUG_MM ...
2016-11-07Backmerge tag 'v4.9-rc4' into drm-nextDave Airlie1-1/+21
Linux 4.9-rc4 This is needed for nouveau development.
2016-11-02drm: define drm_compat_ioctl NULL on CONFIG_COMPAT=n and reduce #ifdefsJani Nikula1-2/+0
If we define drm_compat_ioctl NULL on CONFIG_COMPAT=n, we don't have to check for the config everywhere. Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1478014844-27454-1-git-send-email-jani.nikula@intel.com
2016-10-26drm: Don't force all planes to be added to the state due to zposVille Syrjälä1-1/+21
We don't want all planes to be added to the state whenever a plane with fixed zpos gets enabled/disabled. This is true especially for eg. cursor planes on i915, as we want cursor updates to go through w/o throttling. Same holds for drivers that don't support zpos at all (i915 actually falls into this category right now since we've not yet added zpos support). Allow drivers more freedom by letting them deal with zpos themselves instead of doing it in drm_atomic_helper_check_planes() unconditionally. Let's just inline the required calls into all the driver that currently depend on this. v2: Inline the stuff into the drivers instead of adding another helper, document things better (Daniel) Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Cc: Seung-Woo Kim <sw0312.kim@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Lyude <cpaul@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: stable@vger.kernel.org Fixes: 44d1240d006c ("drm: add generic zpos property") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1476111056-12734-1-git-send-email-ville.syrjala@linux.intel.com
2016-10-25drm: convert DT component matching to component_match_add_release()Russell King1-2/+3
Convert DT component matching to use component_match_add_release(). Acked-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/E1bwo6l-0005Io-Q1@rmk-PC.armlinux.org.uk
2016-10-17drm: Add reference counting to drm_atomic_stateChris Wilson1-1/+2
drm_atomic_state has a complicated single owner model that tracks the single reference from allocation through to destruction on another thread - or perhaps on a local error path. We can simplify this tracking by using reference counting (at a cost of a few more atomics). This is even more beneficial when the lifetime of the state becomes more convoluted than being passed to a single worker thread for the commit. v2: Double check !intel atomic_commit functions for missing gets v3: Update kerneldocs Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20161014121833.439-27-chris@chris-wilson.co.uk
2016-09-28Merge branch 'sti-drm-next-2016-09-20' of https://github.com/vinceab/linux ↵Dave Airlie19-561/+99
into drm-next Here are some patches for drm-next. It contains: - minor fixes for typo and warning. - sparse and coccicheck warning fixes - bunch of patches fixing issues found while testing drm/sti with an atomic version of weston - the removal of the support of stih415-416 sti platform * 'sti-drm-next-2016-09-20' of https://github.com/vinceab/linux: drm/sti: remove stih415-416 platform support drm/sti: fix compositor debugfs creation drm/sti: use valid video mode drm/sti: in crtc_atomic_flush, enable only planes of this crtc drm/sti: use vtg array instead of vtg_main/aux drm/sti: use different notifier_block for each pipe drm/sti: fix atomic_disable check drm/sti: run gdp init sequence only once drm/sti: run hqvdp init sequence only once drm/sti: fix debug logs drm/sti: dpms function missing for HDMI connector drm/sti: Fix sparse warnings drm: sti: fix coccicheck warnings drm: sti: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()
2016-09-22drm: Don't swallow error codes in drm_dev_alloc()Tom Gundersen1-2/+2
There are many reasons other than ENOMEM that drm_dev_init() can fail. Return ERR_PTR rather than NULL to be able to distinguish these in the caller. Signed-off-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-2-teg@jklm.no
2016-09-20drm/sti: remove stih415-416 platform supportVincent Abriou9-480/+14
stih415 and stih416 platform are obsolete and no more supported. Only stih407 and stih410 platform are maintained. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: Peter Griffin <peter.griffin@linaro.org>
2016-09-20drm/sti: fix compositor debugfs creationVincent Abriou3-16/+12
Fix typo and issue while creating the vid and mixer debugfs entries. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-09-20drm/sti: use valid video modeFabien Dessenne3-10/+10
In atomic mode the crtc_xxx (eg crtc_hdisplay) members of the mode structure may be unset before calling atomic_check/commit for planes. Instead of, use xxx members which are actually set. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: in crtc_atomic_flush, enable only planes of this crtcFabien Dessenne1-0/+4
crtc_atomic_flush performs some additional processing, like plane enable at mixer level. Enable only the planes attached to the CRTC. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: use vtg array instead of vtg_main/auxFabien Dessenne4-15/+10
This is more generic and more consistent with the other members of the sti_compositor struct. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: use different notifier_block for each pipeFabien Dessenne3-7/+9
Each pipe shall have its own notifier block to manage the vblank event. This fixes issues where a client registered on given pipe is later abusively notified of events on the other pipe. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: fix atomic_disable checkFabien Dessenne3-9/+9
When a drm_plane is being disabled, its ->crtc member is set to NULL before the .atomic_disable() func is called. To get the crtc of the plane, read old_state->crtc instead of drm_plane->crtc Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: run gdp init sequence only onceFabien Dessenne1-2/+2
Do not rely on plane->status to define whether this is the first update but rather check for gdp->vtg. This avoids multiple and unwanted calls to sti_vtg_register_client() which breaks the kernel scheduler. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: run hqvdp init sequence only onceFabien Dessenne1-2/+2
Do not rely on plane->status to define whether this is the first update but rather check for hqvdp->xp70_initialized bit status. This avoids multiple and unwanted calls to sti_vtg_register_client() which breaks the kernel scheduler. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: fix debug logsFabien Dessenne3-4/+4
Add some missing \n in logs. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm/sti: dpms function missing for HDMI connectorVincent Abriou1-0/+1
Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-09-20drm/sti: Fix sparse warningsVille Syrjälä10-13/+19
drm/sti/sti_mixer.c:361:6: warning: symbol 'sti_mixer_set_matrix' was not declared. Should it be static? drm/sti/sti_gdp.c:476:5: warning: symbol 'sti_gdp_field_cb' was not declared. Should it be static? drm/sti/sti_gdp.c:885:24: warning: symbol 'sti_gdp_plane_helpers_funcs' was not declared. Should it be static? drm/sti/sti_cursor.c:348:24: warning: symbol 'sti_cursor_plane_helpers_funcs' was not declared. Should it be static? drm/sti/sti_compositor.c:28:28: warning: symbol 'stih407_compositor_data' was not declared. Should it be static? drm/sti/sti_compositor.c:49:28: warning: symbol 'stih416_compositor_data' was not declared. Should it be static? drm/sti/sti_vtg.c:75:1: warning: symbol 'vtg_lookup' was not declared. Should it be static? drm/sti/sti_vtg.c:476:24: warning: symbol 'sti_vtg_driver' was not declared. Should it be static? drm/sti/sti_dvo.c:109:5: warning: symbol 'dvo_awg_generate_code' was not declared. Should it be static? drm/sti/sti_dvo.c:602:24: warning: symbol 'sti_dvo_driver' was not declared. Should it be static? drm/sti/sti_vtac.c:209:24: warning: symbol 'sti_vtac_driver' was not declared. Should it be static? drm/sti/sti_tvout.c:914:24: warning: symbol 'sti_tvout_driver' was not declared. Should it be static? drm/sti/sti_hqvdp.c:786:5: warning: symbol 'sti_hqvdp_vtg_cb' was not declared. Should it be static? drm/sti/sti_hqvdp.c:1253:24: warning: symbol 'sti_hqvdp_plane_helpers_funcs' was not declared. Should it be static? drm/sti/sti_hqvdp.c:1292:5: warning: symbol 'sti_hqvdp_bind' was not declared. Should it be static? drm/sti/sti_hqvdp.c:1385:24: warning: symbol 'sti_hqvdp_driver' was not declared. Should it be static? drm/sti/sti_drv.c:143:6: warning: symbol 'sti_drm_dbg_cleanup' was not declared. Should it be static? Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm: sti: fix coccicheck warningsBenjamin Gaignard1-4/+4
Fix four warnings shown by coccicheck. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-09-20drm: sti: Replace drm_fb_get_bpp_depth() with drm_format_plane_cpp()Laurent Pinchart1-3/+3
The driver needs the number of bytes per pixel, not the bpp and depth info meant for fbdev compatibility. Use the right API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Vincent Abriou <vincent.abriou@st.com>
2016-08-29drm/atomic-helper: Add NO_DISABLE_AFTER_MODESET flag support for plane commitLiu Ying1-1/+1
Drivers may set the NO_DISABLE_AFTER_MODESET flag in the 'flags' parameter of the helper drm_atomic_helper_commit_planes() if the relevant display controllers(e.g., IPUv3 for imx-drm) require to disable a CRTC's planes when the CRTC is disabled. The helper would skip the ->atomic_disable call for a plane if the CRTC of the old plane state needs a modesetting operation. Of course, the drivers need to disable the planes in their CRTC disable callbacks since no one else would do that. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: David Airlie <airlied@linux.ie> Cc: Russell King <linux@armlinux.org.uk> Cc: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1472461923-14364-1-git-send-email-gnuiyl@gmail.com