aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tilcdc/tilcdc_drv.c
AgeCommit message (Collapse)AuthorFilesLines
2020-11-06drm/<drivers>: Constify struct drm_driverDaniel Vetter1-2/+2
Only the following drivers aren't converted: - amdgpu, because of the driver_feature mangling due to virt support. Subsequent patch will address this. - nouveau, because DRIVER_ATOMIC uapi is still not the default on the platforms where it's supported (i.e. again driver_feature mangling) - vc4, again because of driver_feature mangling - qxl, because the ioctl table is somewhere else and moving that is maybe a bit too much, hence the num_ioctls assignment prevents a const driver structure. - arcpgu, because that is stuck behind a pending tiny-fication series from me. - legacy drivers, because legacy requires non-const drm_driver. Note that for armada I also went ahead and made the ioctl array const. Only cc'ing the driver people who've not been converted (everyone else is way too much). v2: Fix one misplaced const static, should be static const (0day) v3: - Improve commit message (Sam) Acked-by: Sam Ravnborg <[email protected]> Cc: kernel test robot <[email protected]> Acked-by: Maxime Ripard <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: [email protected] Cc: Harry Wentland <[email protected]> Cc: Leo Li <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: [email protected] Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-10-27drm/tilcdc: avoid 'make W=2' build failureArnd Bergmann1-2/+2
The -Wmissing-field-initializer warning when building with W=2 turns into an error because tilcdc is built with -Werror: drm/tilcdc/tilcdc_drv.c:431:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "regs", tilcdc_regs_show, 0 }, drm/tilcdc/tilcdc_drv.c:432:33: error: missing field 'data' initializer [-Werror,-Wmissing-field-initializers] { "mm", tilcdc_mm_show, 0 }, Add the missing field initializers to address the warning. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Jyri Sarha <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-10-10drm/tilcdc: Remove tilcdc_crtc_max_width(), use private dataJyri Sarha1-17/+21
We already have a private data member for maximum display width so let's use it and get rid of the redundant tilcdc_crtc_max_width(). The LCDC version probing is moved to before reading the device tree properties so that the version information is available when private data maximum width is initialized, if "max-width" property is not found. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/73683d2ce151cffb811a756595b02892eeac3d84.1602349100.git.jsarha@ti.com
2020-07-14drm/tilcdc: Use standard drm_atomic_helper_commitDaniel Vetter1-46/+1
Gives us proper nonblocking support for free, and a pile of other things. The tilcdc code is simply old enough that it was never converted over, but was stuck forever with the copypasta from when it was initially merged. The riskiest thing with this conversion is maybe that there's an issue with the vblank handling or vblank event handling, which will upset the modern commit support in atomic helpers. But from a cursory review drm_crtc_vblank_on/off is called in the right places, and the event handling also seems to exist (albeit with much hand-rolling and probably some races, could perhaps be converted over to drm_crtc_arm_vblank_event without any real loss). Motivated by me not having to hand-roll the dma-fence annotations for this. v2: Clear out crtc_state->event when we're handling the event, to avoid upsetting the helpers (reported by Jyri). v3: Also send out even whent the crtc is getting disabled. Tilcdc looks a bit like conversion to simple display helpers would work out really nice. Tested-by: Jyri Sarha <[email protected]> Reviewed-by: Jyri Sarha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-06-10drm/tilcdc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPSThomas Zimmermann1-7/+1
DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-06-10drm/tilcdc: Use GEM CMA object functionsThomas Zimmermann1-6/+1
Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-04-08drm/tilcdc: Set up fbdev after fully registering deviceThomas Zimmermann1-2/+1
Generic fbdev support is a DRM client. Set it up after fully registering the new DRM device. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Jyri Sarha <[email protected]> Reviewed-by: Noralf Trønnes <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-03-18drm: convert .debugfs_init() hook to return void.Wambui Karuga1-3/+1
As a result of commit 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail) and changes to various debugfs functions in drm/core and across various drivers, there is no need for the drm_driver.debugfs_init() hook to have a return value. Therefore, declare it as void. This also includes refactoring all users of the .debugfs_init() hook to return void across the subsystem. v2: include changes to the hook and drivers that use it in one patch to prevent driver breakage and enable individual successful compilation of this change. References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html Signed-off-by: Wambui Karuga <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-03-18drm/tilcdc: remove check for return value of debugfs functions.Wambui Karuga1-11/+4
Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), drm_debugfs_create_files() never fails. Therefore, remove the check and error handling of the return value of drm_debugfs_create_files() as it is not needed in tilcdc_debugfs_init(). Also remove local variables that are not used after the changes. v2: remove conversion of tilcdc_debugfs_init() to void to avoid build breakage and enable individual compilation. References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html Signed-off-by: Wambui Karuga <[email protected]> Acked-by: Jyri Sarha <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-01-30Merge tag 'drm-next-2020-01-30' of git://anongit.freedesktop.org/drm/drmLinus Torvalds1-10/+1
Pull drm updates from Davbe Airlie: "This is the main pull request for graphics for 5.6. Usual selection of changes all over. I've got one outstanding vmwgfx pull that touches mm so kept it separate until after all of this lands. I'll try and get it to you soon after this, but it might be early next week (nothing wrong with code, just my schedule is messy) This also hits a lot of fbdev drivers with some cleanups. Other notables: - vulkan timeline semaphore support added to syncobjs - nouveau turing secureboot/graphics support - Displayport MST display stream compression support Detailed summary: uapi: - dma-buf heaps added (and fixed) - command line add support for panel oreientation - command line allow overriding penguin count drm: - mipi dsi definition updates - lockdep annotations for dma_resv - remove dma-buf kmap/kunmap support - constify fb_ops in all fbdev drivers - MST fix for daisy chained hotplug- - CTA-861-G modes with VIC >= 193 added - fix drm_panel_of_backlight export - LVDS decoder support - more device based logging support - scanline alighment for dumb buffers - MST DSC helpers scheduler: - documentation fixes - job distribution improvements panel: - Logic PD type 28 panel support - Jimax8729d MIPI-DSI - igenic JZ4770 - generic DSI devicetree bindings - sony acx424AKP panel - Leadtek LTK500HD1829 - xinpeng XPP055C272 - AUO B116XAK01 - GiantPlus GPM940B0 - BOE NV140FHM-N49 - Satoz SAT050AT40H12R2 - Sharp LS020B1DD01D panels. ttm: - use blocking WW lock i915: - hw/uapi state separation - Lock annotation improvements - selftest improvements - ICL/TGL DSI VDSC support - VBT parsing improvments - Display refactoring - DSI updates + fixes - HDCP 2.2 for CFL - CML PCI ID fixes - GLK+ fbc fix - PSR fixes - GEN/GT refactor improvments - DP MST fixes - switch context id alloc to xarray - workaround updates - LMEM debugfs support - tiled monitor fixes - ICL+ clock gating programming removed - DP MST disable sequence fixed - LMEM discontiguous object maps - prefaulting for discontiguous objects - use LMEM for dumb buffers if possible - add LMEM mmap support amdgpu: - enable sync object timelines for vulkan - MST atomic routines - enable MST DSC support - add DMCUB display microengine support - DC OEM i2c support - Renoir DC fixes - Initial HDCP 2.x support - BACO support for Arcturus - Use BACO for runtime PM power save - gfxoff on navi10 - gfx10 golden updates and fixes - DCN support on POWER - GFXOFF for raven1 refresh - MM engine idle handlers cleanup - 10bpc EDP panel fixes - renoir watermark fixes - SR-IOV fixes - Arcturus VCN fixes - GDDR6 training fixes - freesync fixes - Pollock support amdkfd: - unify more codepath with amdgpu - use KIQ to setup HIQ rather than MMIO radeon: - fix vma fault handler race - PPC DMA fix - register check fixes for r100/r200 nouveau: - mmap_sem vs dma_resv fix - rewrite the ACR secure boot code for Turing - TU10x graphics engine support (TU11x pending) - Page kind mapping for turing - 10-bit LUT support - GP10B Tegra fixes - HD audio regression fix hisilicon/hibmc: - use generic fbdev code and helpers rockchip: - dsi/px30 support virtio: - fb damage support - static some functions vc4: - use dma_resv lock wrappers msm: - use dma_resv lock wrappers - sc7180 display + DSI support - a618 support - UBWC support improvements vmwgfx: - updates + new logging uapi exynos: - enable/disable callback cleanups etnaviv: - use dma_resv lock wrappers atmel-hlcdc: - clock fixes mediatek: - cmdq support - non-smooth cursor fixes - ctm property support sun4i: - suspend support - A64 mipi dsi support rcar-du: - Color management module support - LVDS encoder dual-link support - R8A77980 support analogic: - add support for an6345 ast: - atomic modeset support - primary plane garbage fix arcgpu: - fixes for fourcc handling tegra: - minor fixes and improvments mcde: - vblank support meson: - OSD1 plane AFBC commit gma500: - add pageflip support - reomve global drm_dev komeda: - tweak debugfs output - d32 support - runtime PM suppotr udl: - use generic shmem helpers - cleanup and fixes" * tag 'drm-next-2020-01-30' of git://anongit.freedesktop.org/drm/drm: (1998 commits) drm/nouveau/fb/gp102-: allow module to load even when scrubber binary is missing drm/nouveau/acr: return error when registering LSF if ACR not supported drm/nouveau/disp/gv100-: not all channel types support reporting error codes drm/nouveau/disp/nv50-: prevent oops when no channel method map provided drm/nouveau: support synchronous pushbuf submission drm/nouveau: signal pending fences when channel has been killed drm/nouveau: reject attempts to submit to dead channels drm/nouveau: zero vma pointer even if we only unreference it rather than free drm/nouveau: Add HD-audio component notifier support drm/nouveau: fix build error without CONFIG_IOMMU_API drm/nouveau/kms/nv04: remove set but not used variable 'width' drm/nouveau/kms/nv50: remove set but not unused variable 'nv_connector' drm/nouveau/mmu: fix comptag memory leak drm/nouveau/gr/gp10b: Use gp100_grctx and gp100_gr_zbc drm/nouveau/pmu/gm20b,gp10b: Fix Falcon bootstrapping drm/exynos: Rename Exynos to lowercase drm/exynos: change callback names drm/mst: Don't do atomic checks over disabled managers drm/amdgpu: add the lost mutex_init back drm/amd/display: skip opp blank or unblank if test pattern enabled ...
2020-01-06remove ioremap_nocache and devm_ioremap_nocacheChristoph Hellwig1-1/+1
ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <[email protected]> Acked-by: Arnd Bergmann <[email protected]>
2019-12-16drm/tilcdc: Remove obsolete bundled tilcdc tfp410 driverJyri Sarha1-3/+0
Remove obsolete bundled tfp410 driver with its "ti,tilcdc,tfp410" devicetree binding. No platform has ever used this driver in the mainline kernel and if anybody connects tfp410 to tilcdc he or she should use the generic drm tfp410 bridge driver. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/6e2db6c328467cc51e8d633ecb0ffa7c5736f2e8.1575901747.git.jsarha@ti.com
2019-11-19drm/tilcdc: Drop drm_gem_fb_create wrapperDaniel Vetter1-7/+1
Doesn't do anything. Acked-by: Jyri Sarha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-08-02drm/tilcdc: Remove obsolete crtc_mode_valid() hackJyri Sarha1-1/+0
Earlier there were no mode_valid() helper for crtc and tilcdc had a hack to over come this limitation. But now the mode_valid() helper is there (has been since v4.13), so it is about time to get rid of that hack. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/ <5c4dcb5b1e7975bd2b7ca86f7addf219cd0f9a06.1564750248.git.jsarha@ti.com
2019-07-22Merge v5.3-rc1 into drm-misc-nextMaxime Ripard1-12/+1
Noralf needs some SPI patches in 5.3 to merge some work on tinydrm. Signed-off-by: Maxime Ripard <[email protected]>
2019-07-17drm/tilcdc: drop use of drmP.hSam Ravnborg1-4/+15
Dropped drmP.h and all other header files not used by tilcdc_drv.h. Added the minimal includes and forwards to make the header file self-contained. Then dropped the remaining uses of drmP.h and fixed all fall-out. Signed-off-by: Sam Ravnborg <[email protected]> Acked-by: Emil Velikov <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-21drm/tilcdc: Drop drm_gem_prime_export/importDaniel Vetter1-2/+0
They're the default. Aside: Would be really nice to switch the others over to drm_gem_object_funcs. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-21drm/prime: Actually remove DRIVER_PRIME everywhereDaniel Vetter1-2/+1
Split out to make the functional changes stick out more. All places where DRIVER_PRIME was used have been removed in previous patches already. v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE. v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE. v4: Don't add a space in i915_drv.c (Sam) v5: Add note that previous patches removed all the DRIVER_PRIME users already (Emil). v6: Fixupe ingenic (new driver) while applying. Cc: Sam Ravnborg <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: NXP Linux Team <[email protected]> Cc: [email protected] Cc: [email protected] Cc: VMware Graphics <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234Thomas Gleixner1-12/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 503 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-01-29drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)installDaniel Vetter1-1/+1
If a non-legacy driver calls these it's valid to assume there is interrupt support. The flag is really only needed for legacy drivers, which control IRQ enabling/disabling through the DRM_IOCTL_CONTROL legacy IOCTL. Also remove all the flag usage from non-legacy drivers. v2: Review from Emil: - improve commit message - I forgot hibmc, fix that Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-24drm: Split out drm_probe_helper.hDaniel Vetter1-0/+1
Having the probe helper stuff (which pretty much everyone needs) in the drm_crtc_helper.h file (which atomic drivers should never need) is confusing. Split them out. To make sure I actually achieved the goal here I went through all drivers. And indeed, all atomic drivers are now free of drm_crtc_helper.h includes. v2: Make it compile. There was so much compile fail on arm drivers that I figured I'll better not include any of the acks on v1. v3: Massive rebase because i915 has lost a lot of drmP.h includes, but not all: Through drm_crtc_helper.h > drm_modeset_helper.h -> drmP.h there was still one, which this patch largely removes. Which means rolling out lots more includes all over. This will also conflict with ongoing drmP.h cleanup by others I expect. v3: Rebase on top of atomic bochs. v4: Review from Laurent for bridge/rcar/omap/shmob/core bits: - (re)move some of the added includes, use the better include files in other places (all suggested from Laurent adopted unchanged). - sort alphabetically v5: Actually try to sort them, and while at it, sort all the ones I touch. v6: Rebase onto i915 changes. v7: Rebase once more. Acked-by: Harry Wentland <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Laurent Pinchart <[email protected]> Acked-by: Rodrigo Vivi <[email protected]> Acked-by: Benjamin Gaignard <[email protected]> Acked-by: Jani Nikula <[email protected]> Acked-by: Neil Armstrong <[email protected]> Acked-by: Oleksandr Andrushchenko <[email protected]> Acked-by: CK Hu <[email protected]> Acked-by: Alex Deucher <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-11Merge tag 'tilcdc-4.22' of https://github.com/jsarha/linux into drm-nextDave Airlie1-17/+17
tilcdc pull request for Linux v4.22 Signed-off-by: Dave Airlie <[email protected]> From: Jyri Sarha <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-04drm/tilcdc: Register cpufreq notifier after we have initialized crtcJyri Sarha1-17/+17
Register cpufreq notifier after we have initialized the crtc and unregister it before we remove the ctrc. Receiving a cpufreq notify without crtc causes a crash. Reported-by: Peter Ujfalusi <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2018-11-01drm/tilcdc: Use drm_fbdev_generic_setup()Noralf Trønnes1-9/+2
The CMA helper is already using the drm_fb_helper_generic_probe part of the generic fbdev emulation. This patch makes full use of the generic fbdev emulation by using its drm_client callbacks. This means that drm_mode_config_funcs->output_poll_changed and drm_driver->lastclose are now handled by the emulation code. Additionally fbdev unregister happens automatically on drm_dev_unregister(). The drm_fbdev_generic_setup() call is put after drm_dev_register() in the driver. This is done to highlight the fact that fbdev emulation is an internal client that makes use of the driver, it is not part of the driver as such. If fbdev setup fails, an error is printed, but the driver succeeds probing. Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Acked-by: Jyri Sarha <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-10-01drm/tilcdc: Convert drm_atomic_helper_suspend/resume()Souptick Joarder1-10/+4
convert drm_atomic_helper_suspend/resume() to use drm_mode_config_helper_suspend/resume(). saved_state in tilcdc_drm_private will not be used anymore, so it can be removed. Signed-off-by: Ajit Negi <[email protected]> Signed-off-by: Souptick Joarder <[email protected]> Tested-by: Jyri Sarha <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2018-07-05drm/tilcdc: Defer probe if there are no connectorsSjoerd Simons1-1/+1
During probe there may not be any connectors yet if e.g. the panel failed or hasn't been probed yet. I hitting this in practice the panels probing was being delayed due to using a gpio backlight. Fix this by returning -EPROBE_DEFER so the probing will be retried. Signed-off-by: Sjoerd Simons <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2018-02-28drm/tilcdc: Delete an error message for a failed memory allocation in seven ↵Markus Elfring1-3/+1
functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2017-12-08drm/tilcdc: Use drm_fb_cma_fbdev_init/fini()Noralf Trønnes1-21/+5
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on the fact that drm_device holds a pointer to the drm_fb_helper structure. This means that the driver doesn't have to keep track of that. Also use the drm_fb_helper functions directly. Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Jyri Sarha <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-11-11drm/tilcdc: Use drm_gem_cma_print_info()Noralf Trønnes1-1/+1
There is a new core debugfs file that prints fb/gem info: <debugfs>/dri/<n>/framebuffer Use drm_gem_cma_print_info() to provide info to that output instead of using drm_fb_cma_debugfs_show(). Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Jyri Sarha <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-09-26drm/tilcdc: replace reference/unreference() with get/putAishwarya Pant1-1/+1
For maintaining consistency with kernel coding style replace reference/unreference in ref counting functions with get/put. The following cocci script was used to generate the tilcdc patch: @@ expression ex; @@ ( -drm_framebuffer_unreference(ex); +drm_framebuffer_put(ex); | -drm_dev_unref(ex); +drm_dev_put(ex); | -drm_framebuffer_reference(ex); +drm_framebuffer_get(ex); ) Signed-off-by: Aishwarya Pant <[email protected]> Acked-by: Jyri Sarha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/3f2f592f6ea28adfea3fd8b70421b2fab38f0b94.1506413698.git.aishpant@gmail.com
2017-09-09drm/tilcdc: Use drm_gem_fb_create()Noralf Trønnes1-1/+2
drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Jyri Sarha <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-07-29drm/tilcdc: Use .dumb_map_offset and .dumb_destroy defaultsNoralf Trønnes1-2/+0
This driver can use the drm_driver.dumb_destroy and drm_driver.dumb_map_offset defaults, so no need to set them. Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Jyri Sarha <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-07-26drm/tilcdc: Handle drm_atomic_helper_swap_state failureMaarten Lankhorst1-1/+5
drm_atomic_helper_swap_state() will be changed to interruptible waiting in the next few commits, so all drivers have to be changed to handling failure. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Tomi Valkeinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Sean Paul <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2017-05-17drm/tilcdc: fix include notation and remove -Iinclude/drm flagMasahiro Yamada1-2/+1
Include <drm/*.h> instead of relative path from include/drm, then remove the -Iinclude/drm compiler flag. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-03-14drm: Create DEFINE_DRM_GEM_CMA_FOPS and roll it out to driversDaniel Vetter1-11/+1
Less code ftw. This converts all drivers except the tinydrm helper module. That one needs more work, since it gets the THIS_MODULE reference from tinydrm.ko instead of the actual driver module like it should. Probably needs a similar trick like I used here with generating the entire struct with a macro. Cc: Noralf Trønnes <[email protected]> Reviewed-by: Sean Paul <[email protected]> Reviewed-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-03-11Merge branch 'drm/next/platform' of git://linuxtv.org/pinchartl/media into ↵Daniel Vetter1-1/+0
drm-misc-next Merge Laurent's drm_platform removal code. Only conflict is with the drm_pci.h extraction, which allows me to fix up the misplayed drm_platform_init fumble that 0day and Stephen Rothwell reported. Signed-off-by: Daniel Vetter <[email protected]>
2017-02-17drm: Remove the struct drm_device platformdev fieldLaurent Pinchart1-1/+0
The field contains a pointer to the parent platform device of the DRM device. As struct drm_device also contains a dev pointer to the struct device embedded in the platform_device structure, the platformdev field is redundant. Remove it and use the dev pointer directly. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Acked-by: Jyri Sarha <[email protected]> Acked-by: Vincent Abriou <[email protected]> # For sti Acked-by: Russell King <[email protected]> # For armada Acked-by: Rob Clark <[email protected]> # For msm Acked-by: Xinwei Kong<[email protected]>
2017-02-09drm: tilcdc: use vblank hooks in struct drm_crtc_funcsShawn Guo1-12/+0
The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. While at it, the 'return' of .disable_vblank is dropped to fix the following checkpatch warning. WARNING: void function return statements are not generally useful Signed-off-by: Shawn Guo <[email protected]> Cc: Jyri Sarha <[email protected]> Acked-by: Jyri Sarha <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-02-07drm: remove drm_vblank_no_hw_counter assignment from driver codeShawn Guo1-1/+0
Core code already makes drm_driver.get_vblank_counter hook optional by letting drm_vblank_no_hw_counter be the default implementation for the function hook. So the drm_vblank_no_hw_counter assignment in the driver code becomes redundant and can be removed now. Signed-off-by: Shawn Guo <[email protected]> Cc: Alexey Brodkin <[email protected]> Cc: Liviu Dudau <[email protected]> Cc: Mali DP Maintainers <[email protected]> Cc: Russell King <[email protected]> Cc: Boris Brezillon <[email protected]> Cc: Inki Dae <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: CK Hu <[email protected]> Cc: Neil Armstrong <[email protected]> Cc: Rob Clark <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Mark Yao <[email protected]> Cc: Benjamin Gaignard <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Eric Anholt <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Boris Brezillon <[email protected]> Acked-by: Neil Armstrong <[email protected]> Acked-by: Russell King <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Alexey Brodkin <[email protected]> Acked-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-02-02drm: Rely on mode_config data for fb_helper initializationGabriel Krisman Bertazi1-2/+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 <[email protected]> Signed-off-by: Gabriel Krisman Bertazi <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-01-27drm/tilcdc: Remove tilcdc_debugfs_cleanup()Noralf Trønnes1-12/+0
drm_debugfs_cleanup() now removes all minor->debugfs_list entries automatically, so the drm_driver.debugfs_cleanup callback is not needed. Also remove the unused tilcdc_module_ops.debugfs_cleanup() callback. drm_debugfs_cleanup() removes all debugfs files using debugfs_remove_recursive(), so there should be no need for such a callback in the future. Cc: [email protected] Cc: [email protected] Signed-off-by: Noralf Trønnes <[email protected]> Reviewed-by: Jyri Sarha <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-12-30drm/mm: Convert to drm_printerDaniel Vetter1-1/+3
Including all drivers. I thought about keeping small compat functions to avoid having to change all drivers. But I really like the drm_printer idea, so figured spreading it more widely is a good thing. v2: Review from Chris: - Natural argument order and better name for drm_mm_print. - show_mm() macro in the selftest. Cc: Rob Clark <[email protected]> Cc: Russell King <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Cc: Lucas Stach <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Jyri Sarha <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-11-30drm/tilcdc: fix parsing of some DT propertiesBartosz Golaszewski1-2/+2
The DT binding for tildc is not consistent with the driver code: there are two options - 'max-width' and 'max-pixelclock' specified in the documentation which are parsed as 'ti,max-width' and 'ti,max-pixelclock' respectively. Make the driver code consistent with the binding. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Jyri Sarha <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>
2016-11-30drm/tilcdc: Configure video mode to HW in enable() not in mode_set_nofb()Jyri Sarha1-6/+0
Configure video mode to HW in enable() call back. There is no reason to do it before that. This makes PM functions way easier because there is no HW context to save when screen is for instance blanked. This patch removes mode_set_nofb() call back from tilcdc. Signed-off-by: Jyri Sarha <[email protected]> Tested-by: Bartosz Golaszewski <[email protected]>
2016-11-30drm/tilcdc: Fix tilcdc_crtc_create() return value handlingJyri Sarha1-7/+4
Failed tilcdc_crtc_create() error handling was broken, this patch should fix it. Signed-off-by: Jyri Sarha <[email protected]> Tested-by: Bartosz Golaszewski <[email protected]>
2016-11-30drm/tilcdc: Add drm bridge support for attaching drm bridge driversJyri Sarha1-3/+8
Adds drm bride support for attaching drm bridge drivers to tilcdc. The decision whether a video port leads to an external encoder or bridge is made simply based on remote device's compatible string. The code has been tested with BeagleBone-Black with and without BeagleBone DVI-D Cape Rev A3 using ti-tfp410 driver. Signed-off-by: Jyri Sarha <[email protected]> Tested-by: Bartosz Golaszewski <[email protected]>
2016-11-29drm/tilcdc: Fix race from forced shutdown of crtc in unloadJyri Sarha1-1/+1
Fix race from forced shutdown of crtc in unload by adding internal locking and a boolean telling if device is going to be shutdown. Signed-off-by: Jyri Sarha <[email protected]>
2016-11-29drm/tilcdc: Use unload to handle initialization failuresJyri Sarha1-67/+34
Use unload to handle initialization failures instead of complex goto label mess. To do this the initialization sequence needed slight reordering and some unload functions needed to become conditional. Signed-off-by: Jyri Sarha <[email protected]>
2016-11-29drm/tilcdc: Stop using struct drm_driver load() callbackJyri Sarha1-54/+70
Stop using struct drm_driver load() and unload() callbacks. The callbacks should not be used anymore. Instead of using load the drm_device is allocated with drm_dev_alloc() and registered with drm_dev_register() only after the driver is completely initialized. The deinitialization is done directly either in component unbind callback or in platform driver demove callback. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2016-11-29drm/tilcdc: add a da850-specific compatible stringBartosz Golaszewski1-0/+1
Due to some potential tweaks for the da850 LCDC (for example: the required memory bandwith settings) we need a separate compatible for the IP present on the da850 boards. Suggested-by: Sekhar Nori <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Jyri Sarha <[email protected]>