summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sti
Commit message (Collapse)AuthorAgeFilesLines
...
| | * drm/sti: GDP cropping fails when we remove 2 pixels horizontallyVincent Abriou2016-02-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | GDP source width should be equal to the destination width to get rid of this issue. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
| | * drm/sti: fallback for GDP scalingBich Hemon2016-02-261-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a GDP gets a scale request (which it does not support), it accepts it but crops or clamps and outputs a warning message. Signed-off-by: Bich Hemon <bich.hemon@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| | * drm/sti: GDP planes only support RGB formatsBich Hemon2016-02-261-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | Only RGB formats supported by GDP planes Signed-off-by: Bich Hemon <bich.hemon@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| | * drm/sti: clarify the skip frame/field messageFabien Dessenne2016-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a frame or a field is skipped, output a Warning message instead of an Error message. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| | * drm/sti: awg_utils code cleanupBich Hemon2016-02-261-21/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | data_en is a local variable that doesn't need to be set as awg_generate_instr can be called directly with the requested value. Signed-off-by: Bich Hemon <bich.hemon@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| | * drm/sti: update VTG timing programmingVincent Abriou2016-02-263-88/+173
| | | | | | | | | | | | | | | | | | | | | | | | This update eases to understand the VTG programming. It also sets a VTG output id for each supported connectors. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
| | * drm/sti: set DRIVER_ATOMIC for stibenjamin.gaignard@linaro.org2016-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | sti now support of atomic modesetting so set the flag to enable it. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| | * drm/sti: fix cursor coordinatesbenjamin.gaignard@linaro.org2016-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | fix x/y typo while setting cursor coordinates Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| | * drm/sti: set CRTC modesetting parametersbenjamin.gaignard@linaro.org2016-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | Set CRTC modesetting parameters to avoid warnings in atomic mode. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| | * drm/sti: fix potential crash in gdpbenjamin.gaignard@linaro.org2016-02-261-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases last_close() could be called before sti_gdp_disable() and make kernel crash because mixer structure has been destroy. Let's gdp keep a reference on vtg to fix that (like it is already done in HQVDP) Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
| * | drm/sti: removed optional dummy crtc mode_fixup function.Carlos Palminha2016-03-041-9/+0
| |/ | | | | | | | | | | | | | | | | This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha@synopsys.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/08d27e27582fb2daa48555ab542245c6cf0a2268.1455630967.git.palminha@synopsys.com
| * drm/sti: removed optional dummy encoder mode_fixup function.Carlos Palminha2016-02-161-10/+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: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/7f47c6a7b00e4f16af672ebf3a277e31ad117e21.1455540137.git.palminha@synopsys.com
* | dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()Luis R. Rodriguez2016-03-093-16/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines seemlessly. Build tested successfully with allmodconfig. The following Coccinelle SmPL patch was used for this simple transformation: @ rename_dma_alloc_writecombine @ expression dev, size, dma_addr, gfp; @@ -dma_alloc_writecombine(dev, size, dma_addr, gfp) +dma_alloc_wc(dev, size, dma_addr, gfp) @ rename_dma_free_writecombine @ expression dev, size, cpu_addr, dma_addr; @@ -dma_free_writecombine(dev, size, cpu_addr, dma_addr) +dma_free_wc(dev, size, cpu_addr, dma_addr) @ rename_dma_mmap_writecombine @ expression dev, vma, cpu_addr, dma_addr, size; @@ -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size) +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size) We also keep the old names as compatibility helpers, and guard against their definition to make backporting easier. Generated-by: Coccinelle SmPL Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: benh@kernel.crashing.org Cc: bhelgaas@google.com Cc: bp@suse.de Cc: dan.j.williams@intel.com Cc: daniel.vetter@ffwll.ch Cc: dhowells@redhat.com Cc: julia.lawall@lip6.fr Cc: konrad.wilk@oracle.com Cc: linux-fbdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: luto@amacapital.net Cc: mst@redhat.com Cc: tomi.valkeinen@ti.com Cc: toshi.kani@hp.com Cc: vinod.koul@intel.com Cc: xen-devel@lists.xensource.com Link: http://lkml.kernel.org/r/1453516462-4844-1-git-send-email-mcgrof@do-not-panic.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* dma-mapping: always provide the dma_map_ops based implementationChristoph Hellwig2016-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the generic implementation to <linux/dma-mapping.h> now that all architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now that everyone supports them. [valentinrothberg@gmail.com: remove leftovers in Kconfig] Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Chris Metcalf <cmetcalf@ezchip.com> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Helge Deller <deller@gmx.de> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Steven Miao <realmz6@gmail.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Joerg Roedel <jroedel@suse.de> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drm/fb_cma_helper: Remove implicit call to disable_unused_functionsMaxime Ripard2016-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The drm_fbdev_cma_init function always calls the drm_helper_disable_unused_functions. Since it's part of the usual probe process, all the drivers using that helper will end up having their encoder and CRTC disable functions called at probe if their device has not been reported as enabled. This could be fixed by reading out from the registers the current state of the device if it is enabled, but even that will not handle the case where the device is actually disabled. Moreover, the drivers using the atomic modesetting expect that their enable and disable callback to be called when the device is already enabled or disabled (respectively). We can however fix this issue by moving the call to drm_helper_disable_unused_functions out of drm_fbdev_cma_init and make the drivers needing it (all the drivers calling drm_fbdev_cma_init and not using the atomic modesetting) explicitly call it. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1452785109-6172-14-git-send-email-maxime.ripard@free-electrons.com Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/sti: Drop bogus drm_mode_sort() callVille Syrjälä2015-12-111-2/+0
| | | | | | | | | | | | | | | | sti seems confused about which mode list is used in its .get_modes() hook. It adds the modes to the probed_modes list (as is appropriate) but then for some reason it tries to sort the old mode list. Just drop the sorting since it does nothing, and let the probe helper do its thing. It will sort the final mode list after merging in the modes from the probed_modes list and validating them. 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> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449177255-9515-8-git-send-email-ville.syrjala@linux.intel.com
* drm: Pass 'name' to drm_encoder_init()Ville Syrjälä2015-12-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-113-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* drm/sti: load HQVDP firmware the first time HQVDP's plane is usedVincent Abriou2015-11-032-153/+150
| | | | | | | | | | | | | | The way to load the HQVDP firmware has been updated. HQVDP firmware is now loaded the first time an HQVDP plane is used and no more when the HQVDP driver is bound. This solves the dependency we had on the file system availability. The first time the HQVDP plane is used, we are sure that file system is available so request_firmware function will match. CONFIG_FW_LOADER_USER_HELPER_FALLBACK is then no more mandatory. Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: fix typo issue in sti_mode_config_initVincent Abriou2015-11-031-2/+2
| | | | | | Assign width to width and height to height. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: set mixer background color through module paramVincent Abriou2015-11-031-5/+8
| | | | | | | | | Add bkgcolor module parameter that allow to change the background color of the mixer. It can be set with an RGB value coded as 0xRRGGBB. The default value is black. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Nicolas VANHAELEWYN <nicolas.vanhaelewyn@st.com>
* drm/sti: Remove local fbdev emulation Kconfig optionArchit Taneja2015-11-032-8/+1
| | | | | | | | | | | | DRM_STI_FBDEV config is currently used to enable/disable fbdev emulation for the sti kms driver. Remove this local config option and use the core fb helpers with drm_kms_helper.fbdev_emulation module option to enable/disable fbdev at runtime. Signed-off-by: Archit Taneja <architt@codeaurora.org> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: remove redundant sign extensionsRasmus Villemoes2015-11-031-4/+0
| | | | | | | | | arg is long int, so arg = (arg << 22) >> 22 makes the upper 22 bits of arg equal to bit 9 (or bit 41). But we then mask away all but bits 0-9, so this is entirely redundant. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: hdmi use of_get_i2c_adapter_by_node interfaceVladimir Zapolskiy2015-11-031-11/+6
| | | | | | | | | This change is needed to properly lock I2C bus device and driver, which serve DDC lines. Without this change I2C bus driver module may gone in runtime and this won't be noticed by the driver. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: hdmi fix i2c adapter device refcountingVladimir Zapolskiy2015-11-031-18/+31
| | | | | | | | | | | | The commit 53bdcf5f026c ("drm: sti: fix sub-components bind") moves i2c adapter search and locking from .bind() to .probe(), however proper error path in the modified .probe() is not implemented and leftover of the related error path in .bind() remains. This change fixes these issues. Fixes: 53bdcf5f026c ("drm: sti: fix sub-components bind") Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: Do not export symbolsThierry Reding2015-11-034-13/+0
| | | | | | | | | | None of these exported symbols are used outside of the drm-sti driver, so there is no reason to export them. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: Build monolithic driverThierry Reding2015-11-0311-30/+42
| | | | | | | | | | | There's no use building the individual drivers as separate modules because they are all only useful if combined into a single DRM/KMS device. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: Use drm_crtc_vblank_*() APIThierry Reding2015-11-035-28/+32
| | | | | | | | | | Non-legacy drivers should only use this API to allow per-CRTC data to be eventually moved into struct drm_crtc. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: Store correct CRTC index in eventsThierry Reding2015-11-031-1/+1
| | | | | | | | | | | A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. STi does support VBLANKs, so there is no need for the fallback code. Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: Select FW_LOADERThierry Reding2015-11-031-0/+1
| | | | | | | | Select FW_LOADER explicitly to satify the direct dependency of FW_LOADER_USER_HELPER_FALLBACK. Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/sti: Constify function pointer structsVille Syrjälä2015-11-035-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves a bunch of junk to .rodata from .data. drivers/gpu/drm/sti/sticompositor.ko: -.text 12216 +.text 12212 -.rodata 1284 +.rodata 1400 -.data 488 +.data 372 drivers/gpu/drm/sti/sti_drv.ko: -.rodata 516 +.rodata 544 -.data 368 +.data 340 drivers/gpu/drm/sti/stidvo.ko: -.text 3356 +.text 3348 -.rodata 188 +.rodata 256 -.data 572 +.data 504 drivers/gpu/drm/sti/sti_hda.ko: -.text 3008 +.text 3004 -.rodata 2820 +.rodata 2888 -.data 684 +.data 616 drivers/gpu/drm/sti/stihdmi.ko: -.text 6988 +.text 6980 -.rodata 1340 +.rodata 1408 -.data 176 +.data 108 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.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-062-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/atomic-helper: Add option to update planes only on active crtcDaniel Vetter2015-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With drivers supporting runtime pm it's generally not a good idea to touch the hardware when it's off. Add an option to the commit_planes helper to support this case. Note that the helpers already add all planes on a crtc when a modeset happens, hence plane updates will not be lost if drivers set this to true. v2: Check for NULL state->crtc before chasing the pointer. Also check both old and new crtc if there's a switch. Finally just outright disallow switching crtcs for a plane if the plane is in active use, on most hardware that doesn't make sense. v3: Since commit_planes(active_only = true) is for enabling things only after all the crtc are on we should only look at the new crtc to decide whether to call the plane hooks - if the current CRTC isn't on then skip. If the old crtc (when moving a plane) went down then the plane should have been disabled as part of the pipe shutdown work already. For which there's currently no helper really unfortunately. Also move the check for wether a plane gets a new CRTC assigned while still in active use out of this patch. v4: Rebase over exynos changes. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <treding@nvidia.com> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* Merge branch 'drm-sti-next-atomic-2015-08-11' of ↵Dave Airlie2015-08-1426-1621/+1311
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next This serie of patches fix minor bugs around how driver sub-components are bind and planes z-ordering. The main part is about atomic support: using more atomic helpers allow us to simplify the code (~300 lines removed) and to ahve a better match between drm concepts (planes and crtc) and hardware split. [airlied: fixed up conflict in atomic code] * 'drm-sti-next-atomic-2015-08-11' of http://git.linaro.org/people/benjamin.gaignard/kernel: drm/sti: atomic crtc/plane update drm/sti: rename files and functions drm/sti: code clean up drm/sti: fix dynamic z-ordering drm: sti: fix sub-components bind
| * drm/sti: atomic crtc/plane updateVincent Abriou2015-08-0313-877/+809
| | | | | | | | | | | | | | | | | | | | | | Better fit STI hardware structure. Planes are no more responsible of updating mixer information such as z-order and status. It is now up to the CRTC atomic flush to do it. Plane actions (enable or disable) are performed atomically. Disabling of a plane is synchronize with the vsync event. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
| * drm/sti: rename files and functionsVincent Abriou2015-08-0316-183/+182
| | | | | | | | | | | | | | replace all "sti_drm_" occurences by "sti_" Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
| * drm/sti: code clean upVincent Abriou2015-08-0319-886/+713
| | | | | | | | | | | | | | | | | | | | Purpose is to simplify the STI driver: - remove layer structure - consider video subdev as part of the compositor (like mixer subdev) - remove useless STI_VID0 and STI_VID1 enum Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
| * drm/sti: fix dynamic z-orderingVincent Abriou2015-08-033-20/+24
| | | | | | | | | | | | | | | | | | | | Apply the plane depth when the plane is updated. If the depth is different from the previous plane update, the register controlling the plane depth is cleaned and updated with the new depth. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
| * drm: sti: fix sub-components bindBenjamin Gaignard2015-08-033-94/+22
| | | | | | | | | | | | | | | | | | | | | | Fix misunderstanding in how use component framework. drm_platform_init() is now call only when all the sub-components are register themselves instead of the previous broken two stages mechanism. Update bindings documentation. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* | drm/atomic: pass old crtc state to atomic_begin/flush.Maarten Lankhorst2015-07-271-2/+4
|/ | | | | | | | | | | | In intel it's useful to keep track of some state changes with old crtc state vs new state, for example to disable initial planes or when a modeset's prevented during fastboot. Cc: dri-devel@lists.freedesktop.org Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com> [danvet: squash in fixup for exynos provided by Maarten.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/sti: vtg fix CEA-861E video format timing errorVincent Abriou2015-06-081-2/+5
| | | | | | | | | | | HDMI analyzer tests showed that Vsync and Hsync signal were not compliant with the HDMI protocol. HDMI_DELAY should be taken into account in the VTG Vsync programming to reflect the 6 pixels shift introduced in the VTG Hsync programming. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: hdmi fix CEA-861E video format timing errorVincent Abriou2015-06-081-2/+2
| | | | | | | | | | HDMI analyzer tests showed that Vsync and Hsync signal were not compliant with the HDMI protocol. The first active pixel of a line is defined by HDMI_ACTIVE_VID_XMIN. The last active pixel of a line is defined by HDMI_ACTIVE_VID_XMAX. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: VTG interrupt names are badly displayedVincent Abriou2015-06-081-5/+2
| | | | | | | | VTG interrupt names are badly displayed using "cat /proc/interrupts". Simply use the VTG device name while registering the VTG interrupts to fix it. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: missing first pixel column on HDMI displayVincent Abriou2015-06-081-10/+32
| | | | | | | VTG programing updated to fix the shift of one column observed on HDMI display. Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sti: correctly test devm_ioremap() returnWei Yongjun2015-06-081-2/+2
| | | | | | | | In case of error, the function devm_ioremap_nocache() returns NULL not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
* drm: sti: convert driver to atomic modesetBenjamin Gaignard2015-03-197-146/+205
| | | | | | | | | v1: This patch does the minimum to make sti driver use atomic helpers. No big bang, only adapt some functions to new call order. v2: Use dpms and page flip atomic helpers Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
* drm: sti: HDMI add audio infoframeArnaud Pouliquen2015-02-051-42/+137
| | | | | | Add a default audio infoframe for HDMI compliance Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
* drm: sti: add support of XBGR8888 for gdp planeFabien Dessenne2015-02-051-0/+4
| | | | | | Use GDP capabilities to support DRM_FORMAT_XBGR8888 (XB24) Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
OpenPOWER on IntegriCloud