aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-08Revert "drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()"Boris Brezillon1-5/+1
This reverts commit b18398c16e17 ("drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-2-boris.brezillon@collabora.com
2020-01-07drm: Set crc->opened to false before setting crc source to NULL.Dingchen Zhang1-0/+5
to terminate the while-loop in drm_dp_aux_crc_work when drm_dp_start/stop_crc are called in the hook to set crc source. v3: set crc->opened to false without checking (Nick) v2: Move spin_lock around entire crc->opened use (Daniel) Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Harry Wentland <Harry.Wentland@amd.com> Cc: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com> Signed-off-by: Dingchen Zhang <dingchen.zhang@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190726173743.11641-1-dingchen.zhang@amd.com
2020-01-07drm: remove the newline for CRC source name.Dingchen Zhang1-2/+2
userspace may transfer a newline, and this terminating newline is replaced by a '\0' to avoid followup issues. 'len-1' is the index to replace the newline of CRC source name. v3: typo fix (Sam) v2: update patch subject, body and format. (Sam) Cc: Leo Li <sunpeng.li@amd.com> Cc: Harry Wentland <Harry.Wentland@amd.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Dingchen Zhang <dingchen.zhang@amd.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190610134751.14356-1-dingchen.zhang@amd.com
2020-01-07drm: zte: Provide ddc symlink in vga connector sysfs directoryAndrzej Pietrasiewicz1-2/+4
Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-5-andrzej.p@collabora.com
2020-01-07drm: zte: Provide ddc symlink in hdmi connector sysfs directoryAndrzej Pietrasiewicz1-2/+4
Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-4-andrzej.p@collabora.com
2020-01-07drm/vc4: Provide ddc symlink in connector sysfs directoryAndrzej Pietrasiewicz1-4/+8
Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-3-andrzej.p@collabora.com
2020-01-07drm/tegra: Provide ddc symlink in output connector sysfs directoryAndrzej Pietrasiewicz2-6/+8
Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-2-andrzej.p@collabora.com
2020-01-07drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()Boris Brezillon1-1/+5
drm_atomic_bridge_chain_check() callers can pass a NULL bridge. Let's bail out before dereferencing the bridge pointer when that happens. Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Fixes: b86d895524ab ("drm/bridge: Add an ->atomic_check() hook") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20200107113031.435604-1-boris.brezillon@collabora.com
2020-01-07drm/mgag200: Add module parameter to pin all buffers at offset 0Thomas Zimmermann1-0/+14
For hardware that does not interpret the startadd field correctly, add the module parameter 'hw_bug_no_startadd', which enables the workaround. v3: * style and typo fixes v2: * ask user for feedback if the option is active Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: John Donnelly <john.p.donnelly@oracle.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191126101950.11989-1-tzimmermann@suse.de
2020-01-07drm/vram-helper: Support struct drm_driver.gem_create_objectThomas Zimmermann1-3/+12
Drivers that what to allocate VRAM GEM objects with additional fields can now do this by implementing struct drm_driver.gem_create_object. v3: * separately check allocation failure in if/else branches before upcast to gbo v2: * only cast to gbo within if branch; set gbo directly in else branch Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200106125745.13797-9-tzimmermann@suse.de
2020-01-07drm/vram-helper: Remove BO device from public interfaceThomas Zimmermann5-17/+13
TTM is an implementation detail of the VRAM helpers and therefore shouldn't be exposed to the callers. There's only one correct value for the BO device anyway, which is the one stored in the DRM device. So remove struct ttm_bo_device from the VRAM-helper interface and use the device's VRAM manager unconditionally. The GEM initializer function fails if the VRAM manager has not been initialized. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200106125745.13797-8-tzimmermann@suse.de
2020-01-07drm/vram-helper: Remove interruptible flag from public interfaceThomas Zimmermann5-15/+10
The flag 'interruptible', which is passed to various functions, is always set to be false. Remove it and hard-code the value. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Suggested-by: Daniel Vetter <daniel@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200106125745.13797-7-tzimmermann@suse.de
2020-01-07drm/bridge: Add the necessary bits to support bus format negotiationBoris Brezillon1-1/+266
drm_bridge_state is extended to describe the input and output bus configurations. These bus configurations are exposed through the drm_bus_cfg struct which encodes the configuration of a physical bus between two components in an output pipeline, usually between two bridges, an encoder and a bridge, or a bridge and a connector. The bus configuration is stored in drm_bridge_state separately for the input and output buses, as seen from the point of view of each bridge. The bus configuration of a bridge output is usually identical to the configuration of the next bridge's input, but may differ if the signals are modified between the two bridges, for instance by an inverter on the board. The input and output configurations of a bridge may differ if the bridge modifies the signals internally, for instance by performing format conversion, or*modifying signals polarities. Bus format negotiation is automated by the core, drivers just have to implement the ->atomic_get_{output,input}_bus_fmts() hooks if they want to take part to this negotiation. Negotiation happens in reverse order, starting from the last element of the chain (the one directly connected to the display) up to the first element of the chain (the one connected to the encoder). During this negotiation all supported formats are tested until we find one that works, meaning that the formats array should be in decreasing preference order (assuming the driver has a preference order). Note that the bus format negotiation works even if some elements in the chain don't implement the ->atomic_get_{output,input}_bus_fmts() hooks. In that case, the core advertises only MEDIA_BUS_FMT_FIXED and lets the previous bridge element decide what to do (most of the time, bridge drivers will pick a default bus format or extract this piece of information from somewhere else, like a FW property). Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> [narmstrong: fixed doc in include/drm/drm_bridge.h:69 fmt->format] Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-5-narmstrong@baylibre.com
2020-01-07drm/bridge: Add an ->atomic_check() hookBoris Brezillon2-6/+68
So that bridge drivers have a way to check/reject an atomic operation. The drm_atomic_bridge_chain_check() (which is just a wrapper around the ->atomic_check() hook) is called in place of drm_bridge_chain_mode_fixup() (when ->atomic_check() is not implemented, the core falls back on ->mode_fixup(), so the behavior should stay the same for existing bridge drivers). Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-4-narmstrong@baylibre.com
2020-01-07drm/bridge: Patch atomic hooks to take a drm_bridge_stateBoris Brezillon3-32/+78
This way the drm_bridge_funcs interface is consistent with the rest of the subsystem. The only driver implementing those hooks (analogix DP) is patched too. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> [narmstrong: renamed state as old_bridge_state in rcar_lvds_atomic_disable] Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-3-narmstrong@baylibre.com
2020-01-07drm/bridge: Add a drm_bridge_state objectBoris Brezillon3-6/+192
One of the last remaining objects to not have its atomic state. This is being motivated by our attempt to support runtime bus-format negotiation between elements of the bridge chain. This patch just paves the road for such a feature by adding a new drm_bridge_state object inheriting from drm_private_obj so we can re-use some of the existing state initialization/tracking logic. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed by: Jernej Skrabec <jernej.skrabec@siol.net> Tested-by: Jonas Karlman <jonas@kwiboo.se> Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-2-narmstrong@baylibre.com
2020-01-06Revert "drm: atmel-hlcdc: enable sys_clk during initalization."Claudiu Beznea1-18/+1
This reverts commit d2c755e66617620b729041c625a6396c81d1231c ("drm: atmel-hlcdc: enable sys_clk during initalization."). With commit "drm: atmel-hlcdc: enable clock before configuring timing engine" there is no need for this patch. Code is also simpler. Cc: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-7-git-send-email-claudiu.beznea@microchip.com
2020-01-06drm: atmel-hlcdc: prefer a lower pixel-clock than requestedPeter Rosin1-2/+2
The intention was to only select a higher pixel-clock rate than the requested, if a slight overclocking would result in a rate significantly closer to the requested rate than if the conservative lower pixel-clock rate is selected. The fixed patch has the logic the other way around and actually prefers the higher frequency. Fix that. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Fixes: 9946a3a9dbed ("drm/atmel-hlcdc: allow selecting a higher pixel-clock than requested") Reported-by: Claudiu Beznea <claudiu.beznea@microchip.com> Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Boris Brezillon <boris.brezillon@bootlin.com> Cc: <stable@vger.kernel.org> # v4.20+ Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-6-git-send-email-claudiu.beznea@microchip.com
2020-01-06drm: atmel-hlcdc: enable clock before configuring timing engineClaudiu Beznea1-1/+7
Changing pixel clock source without having this clock source enabled will block the timing engine and the next operations after (in this case setting ATMEL_HLCDC_CFG(5) settings in atmel_hlcdc_crtc_mode_set_nofb() will fail). It is recomended (although in datasheet this is not present) to actually enabled pixel clock source before doing any changes on timing enginge (only SAM9X60 datasheet specifies that the peripheral clock and pixel clock must be enabled before using LCD controller). Fixes: 1a396789f65a ("drm: add Atmel HLCDC Display Controller support") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: <stable@vger.kernel.org> # v4.0+ Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-3-git-send-email-claudiu.beznea@microchip.com
2020-01-06drm: atmel-hlcdc: use double rate for pixel clock only if supportedClaudiu Beznea1-3/+3
Doubled system clock should be used as pixel cock source only if this is supported. This is emphasized by the value of atmel_hlcdc_crtc::dc::desc::fixed_clksrc. Fixes: a6eca2abdd42 ("drm: atmel-hlcdc: add config option for clock selection") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Boris Brezillon <bbrezillon@kernel.org> Cc: <stable@vger.kernel.org> # v5.3+ Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-2-git-send-email-claudiu.beznea@microchip.com
2020-01-06drm/bridge: cdns: remove set but not used variable 'nlanes'yu kuai1-2/+1
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/bridge/cdns-dsi.c: In function ‘cdns_dsi_mode2cfg’: drivers/gpu/drm/bridge/cdns-dsi.c:515:11: warning: variable ‘nlanes’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai <yukuai3@huawei.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191226121415.39483-1-yukuai3@huawei.com
2020-01-06drm/bridge: cdns: remove set but not used variable 'bpp'yu kuai1-2/+1
Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/bridge/cdns-dsi.c: In function ‘cdns_dsi_bridge_enable’: drivers/gpu/drm/bridge/cdns-dsi.c:788:6: warning: variable ‘bpp’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai <yukuai3@huawei.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191226121207.2099-1-yukuai3@huawei.com
2020-01-06drm: meson: Remove unneeded semicolonzhengbin2-2/+2
Fixes coccicheck warning: drivers/gpu/drm/meson/meson_crtc.c:360:3-4: Unneeded semicolon drivers/gpu/drm/meson/meson_plane.c:181:2-3: Unneeded semicolon Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/1576468701-69717-1-git-send-email-zhengbin13@huawei.com
2020-01-06drm: bridge: dw-hdmi: constify copied structureJulia Lawall1-1/+1
The dw_hdmi_hw structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Fixes: 7ed6c665e19d ("drm: bridge/dw_hdmi-ahb-audio: add audio driver") Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Link: https://patchwork.freedesktop.org/patch/msgid/1577864614-5543-16-git-send-email-Julia.Lawall@inria.fr
2020-01-06drm/hisilicon/hibmc: Export VRAM MM information to debugfsThomas Zimmermann1-0/+1
This change makes information about VRAM consumption available on debugfs. See /sys/kernel/debug/dri/0/vram-mm for an overview of how VRAM is being used. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-6-tzimmermann@suse.de
2020-01-06drm/hisilicon/hibmc: Implement hibmc_dumb_create() with generic helpersThomas Zimmermann2-50/+2
The hibmc driver aligns scanlines to 16 bytes. By using the new pitch_align argument of drm_gem_vram_fill_create_dumb(), convert hibmc over. v2: * move changes to VRAM helpers into separate patch Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-5-tzimmermann@suse.de
2020-01-06drm/vram: Support scanline alignment for dumb buffersThomas Zimmermann2-4/+11
Adding the pitch alignment as an argument to drm_gem_vram_fill_create_dumb() allows to align scanlines to certain offsets. A value of 0 disables scanline pitches. v3: * only do power-of-2 test if pitch_align given; fails otherwise * mgag200: call drm_gem_vram_fill_create_dumb() with pitch_align v2: * split of patch from related hibmc changes * test if scanline pitch is power of 2 Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-4-tzimmermann@suse.de
2020-01-06drm/hisilicon/hibmc: Replace struct hibmc_framebuffer with generic codeThomas Zimmermann3-81/+3
The hibmc driver's struct hibmc_framebuffer stores a DRM framebuffer with an associated GEM object. This functionality is also provided by generic code. Switch hibmc over. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-3-tzimmermann@suse.de
2020-01-06drm/hisilicon/hibmc: Switch to generic fbdev emulationThomas Zimmermann4-255/+3
There's nothing special about hibmc's fbdev emulation that is not provided by the generic implementation. Switch over and remove the driver's code. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-2-tzimmermann@suse.de
2020-01-06drm: rockchip: rk3066_hdmi: set edid fifo addressNickey Yang1-0/+3
Fix edid reading error when edid's block > 2. Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com> Signed-off-by: Johan Jonker <jbx6244@gmail.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191211203417.19448-1-jbx6244@gmail.com
2020-01-06drm/rockchip: lvds: Add PX30 supportMiquel Raynal2-0/+157
Introduce PX30 LVDS support. This means adding the relevant helper functions, a specific probe and also the initialization of a specific PHY. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-10-miquel.raynal@bootlin.com
2020-01-06Merge drm/drm-next into drm-misc-nextMaarten Lankhorst5270-119759/+289426
Requested, and we need v5.5-rc1 backported as our current branch is still based on v5.4. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2020-01-05drm/rockchip: lvds: move hardware-specific functions togetherMiquel Raynal1-45/+45
Reorganize a bit the functions order to clarify the driver and separate hardware independent and specific functions a bit. This change only moves functions around, there is no functional change. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [adapted to recent drm_panel_get_modes() param change ] Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-9-miquel.raynal@bootlin.com
2020-01-05drm/rockchip: lvds: improve error handling in helper functionsMiquel Raynal1-8/+23
Return errors instead of returning void from internal helpers. When these helpers are called, check the returned value and print an error message in this case and not blindly continue. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-8-miquel.raynal@bootlin.com
2020-01-05drm/rockchip: lvds: Create an RK3288 specific probe functionMiquel Raynal1-37/+57
The probe function is highly adapted to the RK3288 specificities, move all specific bits into an "rk3288_probe" function, also part of the platform data. The goal is to ease the addition of new flavors of Rockchip LVDS IPs. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-7-miquel.raynal@bootlin.com
2020-01-05drm/rockchip: lvds: Change platform data to hold helper_funcs pointerMiquel Raynal2-21/+14
Prepare the introduction of PX30 support by using drm_encoder_helper_funcs as platform data instead of multiple register names which are specific to rk3288 and not generic to all Rockchip IPs. This way adding support for a new flavor of a similar IP will be a matter of adding the relevant helper funcs. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-6-miquel.raynal@bootlin.com
2020-01-05drm/rockchip: lvds: Harmonize function namesMiquel Raynal1-66/+74
Prepare the introduction of PX30 support by clarifying the function prefixes. We continue to prefix with 'rockchip_lvds_' generic functions that are not specific to a single hardware. Functions implying hardware modifications are now prefixed with 'rk3288_lvds_'. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-5-miquel.raynal@bootlin.com
2020-01-05drm/rockchip: lvds: Fix indentation of a #defineMiquel Raynal1-1/+1
Fix a #define indentation before adding more lines. Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS") Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-4-miquel.raynal@bootlin.com
2020-01-04drm/panel: add panel driver for Leadtek LTK500HD1829Heiko Stuebner3-0/+543
The LTK500HD1829 is 5.5" DSI display. v5: - Fix some trivial checkpatch warnings while applying (sam) changes in v4: - drop error message if backlight not found, no other panel does that and if needed it should live in drm_panel_of_backlight changes in v3: - drop one more overlooked panel->drm access Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191224112641.30647-3-heiko@sntech.de
2020-01-04drm/panel: add panel driver for Xinpeng XPP055C272 panelsHeiko Stuebner3-0/+409
Base on the somewhat similar Rocktech driver but adapted for panel-specific init of the XPP055C272. changes in v5: - drop error message when backlight not found, no other panel does that and if needed it should live in drm_panel_of_backlight changes in v4: none changes in v3: - remove wrong negative sync flags from display-mode to fix a display artifact of the output getting move a tiny bit to the right changes in v2: - move to drm-panel-internal backlight handling (Sam) - adapt to changes that happened to drm_panel structs+functions (Sam) - sort includes (Sam) - drop unnecessary DRV_NAME constant (Sam) - do mipi_dsi_dcs_exit_sleep_mode and mipi_dsi_dcs_set_display_on in panel prepare (not init_sequence) to keep symmetric (Sam) Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191224112907.30758-3-heiko@sntech.de
2020-01-03omapfb/dss: remove unneeded conversions to boolAndrew F. Davis1-3/+3
Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis <afd@ti.com> Cc: Jiri Kosina <trivial@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191016180424.23907-1-afd@ti.com
2020-01-03video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe()Markus Elfring1-9/+1
Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Cc: Daniel Mack <daniel@zonque.org> Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: YueHaibing <yuehaibing@huawei.com> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/a1b804b1-43c2-327a-d6d1-df49aebec680@web.de
2020-01-03video: ocfb: Use devm_platform_ioremap_resource() in ocfb_probe()Markus Elfring1-8/+1
Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/61b75aa6-ff92-e0ed-53f2-50a95d93d1f6@web.de
2020-01-03video: fbdev: fsl-diu-fb: mark expected switch fall-throughsGustavo A. R. Silva1-0/+2
Mark switch cases where we are expecting to fall through. Fix the following warnings (Building: mpc512x_defconfig powerpc): drivers/video/fbdev/fsl-diu-fb.c: In function ‘fsl_diu_ioctl’: ./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro ‘dev_warn’ dev_warn(info->dev, ^~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here case MFB_SET_PIXFMT: ^~~~ In file included from ./include/linux/acpi.h:15:0, from ./include/linux/i2c.h:13, from ./include/uapi/linux/fb.h:6, from ./include/linux/fb.h:6, from drivers/video/fbdev/fsl-diu-fb.c:20: ./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro ‘dev_warn’ dev_warn(info->dev, ^~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here case MFB_GET_PIXFMT: ^~~~ Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Cc: Timur Tabi <timur@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190911113604.GA31512@embeddedor
2020-01-03fbdev: matrox: make array wtst_xlat static const, makes object smallerColin Ian King1-1/+4
Don't populate the array wtst_xlat on the stack but instead make it static const. Makes the object code smaller by 89 bytes. Before: text data bss dec hex filename 14347 840 0 15187 3b53 fbdev/matrox/matroxfb_misc.o After: text data bss dec hex filename 14162 936 0 15098 3afa fbdev/matrox/matroxfb_misc.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King <colin.king@canonical.com> [b.zolnierkie: use u8 while at it (suggested by Ville Syrjälä)] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190906181114.31414-1-colin.king@canonical.com
2020-01-03fbdev/sa1100fb: use devm_platform_ioremap_resource() to simplify codeYueHaibing1-3/+1
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190904115754.21612-1-yuehaibing@huawei.com
2020-01-03fbdev: s3c-fb: use devm_platform_ioremap_resource() to simplify codeYueHaibing1-2/+1
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Jingoo Han <jingoohan1@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190904115523.25068-1-yuehaibing@huawei.com
2020-01-03fbdev: omapfb: use devm_platform_ioremap_resource() to simplify codeYueHaibing1-3/+1
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Alexios Zavras <alexios.zavras@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Allison Randal <allison@lohutok.net> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190904115406.23880-1-yuehaibing@huawei.com
2020-01-03video/fbdev/68328fb: Remove dead codeSouptick Joarder1-12/+0
This is dead code since 3.15. If their is no plan to use it further, these can be removed forever. Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Cc: Sabyasachi Gupta <sabyasachi.linux@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/1567428544-8620-1-git-send-email-jrdr.linux@gmail.com
2020-01-03pxa168fb: Fix the function used to release some memory in an error handling pathChristophe JAILLET1-3/+3
In the probe function, some resources are allocated using 'dma_alloc_wc()', they should be released with 'dma_free_wc()', not 'dma_free_coherent()'. We already use 'dma_free_wc()' in the remove function, but not in the error handling path of the probe function. Also, remove a useless 'PAGE_ALIGN()'. 'info->fix.smem_len' is already PAGE_ALIGNed. Fixes: 638772c7553f ("fb: add support of LCD display controller on pxa168/910 (base layer)") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Lubomir Rintel <lkundrak@v3.sk> CC: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190831100024.3248-1-christophe.jaillet@wanadoo.fr