summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2016-03-07drm: etnaviv: clean up submit_bo()Russell King
As we now store the etnaviv_vram_mapping, we no longer need to store the iova itself: we can get this directly from the mapping structure. Arrange for submit_bo() to return a pointer to etnaviv_gem_submit_bo, and directly access mapping->iova when applying relocations. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: clean up vram_mapping submission/retire pathRussell King
Currently, we scan the list of mappings each time we want to operate on the vram_mapping struct. Rather than repeatedly scanning these, look them up once in the submission path, and then use _reference and _unreference methods as necessary to manage this object. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: improve readability of command insertion to ring bufferRussell King
Improve the readibility of the function which inserts command buffers and other maintanence commands into the GPUs ring buffer. We do this by splitting the ring buffer reservation in two: one chunk for any commands that need to be issued prior to the command buffer, and a separate chunk for commands issued after the buffer. The result is a much more obvious code flow in this function, and localisation of the conditional maintanence commands prior to the command buffer. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: clean up GPU command submissionRussell King
Clean up the GPU command submission path to prepare for the next change. This makes the next change easier to read and understand. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: use previous GPU pipe state when pipe switchingRussell King
Use the previous GPU pipe state when deciding which GPU caches should be flushed prior to switching the current pipe. This avoids infering what the previously selected pipe was, and potentially flushing the wrong caches. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: flush all GPU caches when stopping GPURussell King
Flush the GPU caches to ensure that any dirty data is pushed out before stopping the front end. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: track current execution stateRussell King
Add tracking of the current execution state (iow, active GPU pipe). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: extract arming of semaphoreRussell King
Extract out the arming of a semaphore from the pipe select code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: extract replacement of WAIT commandRussell King
Extract out the replacement of the WAIT command with some other command. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm: etnaviv: extract command ring reservationRussell King
Provide a helper etnaviv_buffer_reserve() to ensure that we can fit a set of commands into the ring buffer without wrapping by moving code out of etnaviv_buffer_queue(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm/etnaviv: move GPU linear window to end of DMA windowLucas Stach
If the end of the system DMA window is farther away from the start of physical RAM than the size of the GPU linear window, move the linear window so that it ends at the same address than the system DMA window. This allows to map command buffer from CMA, which is likely to reside at the end of the system DMA window, while also overlapping as much RAM as possible, in order to optimize regular buffer mappings through the linear window. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-07drm/etnaviv: move runtime PM balance into retire workerLucas Stach
The retire worker is kicked for each fence, either the normal way by signaling the fence from the event completion interrupt or by the recover worker if the GPU got stuck. Moving the RPM put into the retire worker allows us to have it in a single place for both cases. This also shaves off quite a bit of the CPU time spent in hardirq context, as arming the autosuspend timer when the RPM refcount drops to 0 is a relatively costly operation. Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2016-03-05Merge tag 'omapdrm-4.6' of ↵Dave Airlie
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for v4.6 * HDMI interlace output support * DMAbuf import support * Big refactoring leading to removal of legacy code * Various non-critical fixes * tag 'omapdrm-4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (76 commits) drm/omap: no need to select OMAP2_DSS drm/omap: gem: Fix omap_gem_new() error path drm/omap: remove -Werror from Makefile drm/omap: remove dispc_ovl_check() drm/omap: remove dss compat code drm/omap: remove last uses of omap_overlay_manager drm/omap: DSI: remove uses of omap_overlay_manager drm/omap: VENC: remove uses of omap_overlay_manager drm/omap: SDI: remove uses of omap_overlay_manager drm/omap: HDMI4: remove uses of omap_overlay_manager drm/omap: HDMI5: remove uses of omap_overlay_manager drm/omap: DPI: remove uses of omap_overlay_manager drm/omap: remove extra manager checks on disconnect drm/omap: remove extra check in dpi and sdi drm/omap: convert dss_mgr_unregister_framedone_handler to accept omap_channel drm/omap: convert dss_mgr_register_framedone_handler to accept omap_channel drm/omap: convert dss_mgr_start_update to accept omap_channel drm/omap: convert dss_mgr_disable to accept omap_channel drm/omap: convert dss_mgr_enable to accept omap_channel drm/omap: convert dss_mgr_set_lcd_config to accept omap_channel ...
2016-03-04Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into ↵Dave Airlie
drm-next Big ticket items are hdmi support for 8996 (aka snapdragon 820), and adreno 430 support. Also one more small uapi addition to support timestamp queries. * 'msm-next' of git://people.freedesktop.org/~robclark/linux: (29 commits) drm/msm: rename hdmi symbols drm/msm/adreno: remove duplicate adreno_hw_init() call drm/msm: add timestamp param drm/msm: fix small typo drm/msm: grab struct_mutex after allocating submit drm/msm: reject submit ioctl if no gpu drm/msm/adreno: print details in case of a protect fault interrupt drm/msm/adreno: get CP_RPTR from register instead of shadow memory drm/msm/adreno: add adreno430 power control drm/msm/adreno: support for adreno 430. drm/msm: update generated headers drm/msm/dsi: fix definition of msm_dsi_pll_28nm_8960_init() drm/msm/dsi: Parse DSI lanes via DT drm/msm/dsi: Drop VDD regulator for MSM8916 drm/msm/dsi: Remove incorrect warning on host attach drm/msm: Free fb helper resources in msm_unload drm/msm/mdp: Detach iommu in mdp4_destroy drm/msm: make iommu port names const'ier drm/msm/mdp: Use atomic helper to set crtc property dt-bindings: msm/hdmi: Add HDMI PHY bindings ...
2016-03-03drm/msm: rename hdmi symbolsArnd Bergmann
Global symbols in the kernel should be prefixed by the name of the subsystem and/or driver to avoid conflicts when all code is built-in. In this case, function names like 'hdmi_register' or 'hdmi_set_mode' are way too generic for an MSM specific DRM driver, so I'm renaming them all to msm_hdmi_* here. I also rename a lot of the 'static' symbols along with the global names for consistency, even though those are relatively harmless; they might only be slightly confusing when they show up in backtraces. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm/adreno: remove duplicate adreno_hw_init() callRob Clark
Not sure where it came from, but seem unintentional. And also not needed on a420, so let's just drop it. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm: add timestamp paramRob Clark
We need this for GL_TIMESTAMP queries. Note: currently only supported on a4xx.. a3xx doesn't have this always-on counter. I think we could emulate it with the one CP counter that is available, but for now it is of limited usefulness on a3xx (since we can't seem to do time-elapsed queries in any sane way with the existing firmware on a3xx, and if you are trying to do profiling on a tiler you want time-elapsed). We can add that later if it becomes useful. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm: fix small typoRob Clark
Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm: grab struct_mutex after allocating submitRob Clark
No real need to hold the lock over allocation, and simplifies things slightly if we change the order. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm: reject submit ioctl if no gpuRob Clark
Existing userspace wouldn't get this far, since getparam ioctl would have failed and it would have bailed out creating a screen/context. But all the same, we shouldn't let evil or confused userspace cause a null ptr deref. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm/adreno: print details in case of a protect fault interruptCraig Stout
Signed-off-by: Craig Stout <cstout@chromium.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm/adreno: get CP_RPTR from register instead of shadow memoryCraig Stout
As described in the downstream/kgsl driver: Sometimes the RPTR shadow memory is unreliable causing timeouts in adreno_idle(). Read it directly from the register instead. Signed-off-by: Craig Stout <cstout@chromium.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm/adreno: add adreno430 power controlCraig Stout
Signed-off-by: Craig Stout <cstout@chromium.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm/adreno: support for adreno 430.Craig Stout
Signed-off-by: Craig Stout <cstout@chromium.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm: update generated headersRob Clark
Pull in additional regs needed for a430, etc. Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm/dsi: fix definition of msm_dsi_pll_28nm_8960_init()Luis Henriques
This fixes the following build failure: drivers/gpu/drm/msm/dsi/pll/dsi_pll_28nm.o: In function `msm_dsi_pll_28nm_8960_init': dsi_pll_28nm.c:(.text+0x1198): multiple definition of `msm_dsi_pll_28nm_8960_init' drivers/gpu/drm/msm/dsi/pll/dsi_pll.o:dsi_pll.c:(.text+0x0): first defined here Signed-off-by: Luis Henriques <luis.henriques@canonical.com> Acked-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-03-03drm/msm/dsi: Parse DSI lanes via DTArchit Taneja
The DSI driver is currently unaware of how the DSI physical data lanes are mapped to the logical lanes provided by the DSI controller. Create a DT binding "qcom,data-lane-map" that provides this information on a given platform. The MSM DSI controller is restricted in terms of what all mappings it can support. The lane polarity is fixed for all the lanes, the clock lanes are fixed, and the data lanes can be swapped among each other only for a few combinations. Apply these restrictions when we parse the DT data. Cc: devicetree@vger.kernel.org Cc: Rob Herring <robh@kernel.org> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com> Acked-by: Rob Herring <robh@kernel.org>
2016-03-03drm/omap: no need to select OMAP2_DSSTomi Valkeinen
omapdss driver now depends on omapdrm, so we no longer should select OMAP2_DSS from omapdrm's Kconfig. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: gem: Fix omap_gem_new() error pathLaurent Pinchart
When an error occurs in omap_gem_new() the function calls omap_gem_free_object() to clean up. However, that function expects to be called on a fully initialized GEM object and thus crashes. Replace it by manual cleanup. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove -Werror from MakefileTomi Valkeinen
Having -Werror in the omapdrm Makefile makes development and debugging a PITA. Let's remove it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove dispc_ovl_check()Tomi Valkeinen
dispc_ovl_check() is not used anywhere, so it can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove dss compat codeTomi Valkeinen
We have removed all the uses of compat code from omapdrm and the non-compat parts of omapdss, so now we can remove all the compat code itself. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove last uses of omap_overlay_managerTomi Valkeinen
We have now removed all uses of 'struct omap_overlay_manager', so we can now remove the last places where it is set. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: DSI: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes DSI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: VENC: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes VENC driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: SDI: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes SDI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: HDMI4: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes HDMI4 driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: HDMI5: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes HDMI5 driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: DPI: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes DPI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove extra manager checks on disconnectTomi Valkeinen
The DSS output drivers check 'dssdev->manager' in disconnect() functions. This check is not needed as the manager must always be set if the output device was connected. Remove the check. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove extra check in dpi and sdiTomi Valkeinen
Both dpi and sdi check for 'mgr != NULL' in check_timings. This check is not necessary, as mgr must always be set before check_timings. Remove the check. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_unregister_framedone_handler to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_unregister_framedone_handler() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_register_framedone_handler to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_register_framedone_handler() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_start_update to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_start_update() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_disable to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_enable to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_enable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_set_lcd_config to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_lcd_config() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_set_timings to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_timings() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_disconnect to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disconnect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: convert dss_mgr_connect to accept omap_channelTomi Valkeinen
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_connect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>