summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500
AgeCommit message (Collapse)Author
2021-10-21drm/gma500: Remove generic DRM drivers in probe functionThomas Zimmermann
Gma500 currently removes generic fbdev drivers, but ignores generic DRM drivers. Use aperture helpers to remove all generic graphics drivers before loading gma500. Makes gma500 compatible with simpledrm. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20211019080942.24356-1-tzimmermann@suse.de
2021-10-19drm/gma500: Rename struct gtt_range to struct psb_gem_objectThomas Zimmermann
struct gtt_range represents a GEM object. Rename the structure to struct psb_gem_object and update all users. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-11-tzimmermann@suse.de
2021-10-19drm/gma500: Rewrite GTT page insert/remove without struct gtt_rangeThomas Zimmermann
struct gtt_range represents a GEM object and should not be used for GTT setup. Change psb_gtt_insert() and psb_gtt_remove() to receive all necessary parameters from their caller. This also eliminates possible failure from psb_gtt_insert(). There's one exception in psb_gtt_restore(), which requires an upcast from struct resource to struct gtt_range when restoring the GTT after hibernation. A possible solution would track the GEM objects that need restoration separately from the GTT resource. Rename the functions to psb_gtt_insert_pages() and psb_gtt_remove_pages() to reflect their similarity to MMU interfaces. v3: * restore the comments about locking rules (Patrik) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-10-tzimmermann@suse.de
2021-10-19drm/gma500: Set page-caching flags in GEM pin/unpinThomas Zimmermann
Caching of the GEM object's backing pages are unrelated to GTT management. Move the respective calls from GTT code to GEM code. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-9-tzimmermann@suse.de
2021-10-19drm/gma500: Inline psb_gtt_{alloc,free}_range() into rsp callersThomas Zimmermann
psb_gtt_alloc_range() allocates struct gtt_range, create the GTT resource and performs some half-baked initialization. Inline the function into its only caller psb_gem_create(). For creating the GTT resource, introduce a new helper, psb_gtt_alloc_resource() that hides the details of the GTT. For psb_gtt_free_range(), inline the function into its only caller psb_gem_free_object(). While at it, remove the explicit invocation of drm_gem_free_mmap_offset(). The mmap offset is already released by drm_gem_object_release(). v3: * replace offset[static 1] with pointer notation (Patrik) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-8-tzimmermann@suse.de
2021-10-19drm/gma500: Inline psb_gtt_attach_pages() and psb_gtt_detach_pages()Thomas Zimmermann
psb_gtt_attach_pages() are not GTT functions but deal with the GEM object's SHMEM pages. The only callers of psb_gtt_attach_pages() and psb_gtt_detach_pages() are the GEM pin helpers. Inline the calls and cleanup the resulting code. v2: * unlock gtt_mutex in pin-error handling (Patrik) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-7-tzimmermann@suse.de
2021-10-19drm/gma500: Rename psb_gtt_{pin,unpin}() to psb_gem_{pin,unpin}()Thomas Zimmermann
Rename psb_gtt_pin() to psb_gem_pin() to reflect the semantics of the function. Same for psb_gtt_unpin(). No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-6-tzimmermann@suse.de
2021-10-19drm/gma500: Allocate GTT ranges in stolen memory with psb_gem_create()Thomas Zimmermann
Support private objects for stolen memory in psb_gem_create() and convert users to psb_gem_create(). For stolen memory, psb_gem_create() now initializes the GEM object via drm_gem_private_object_init(). In the fbdev setup, replace the open-coded initialization of struct gtt_range with a call to psb_gem_create(). Use drm_gem_object_put() for release. In the cursor setup, use psb_gem_create() and get a real GEM object. Previously the allocated instance of struct gtt_range was only partially initialized. Release the cursor GEM object in gma_crtc_destroy(). The release was missing from the original code. With the conversion of all callers to psb_gem_create(), the extern declarations of psb_gtt_alloc_range, psb_gtt_free_range and psb_gem_object_func are not required any longer. Declare them as static. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-5-tzimmermann@suse.de
2021-10-19drm/gma500: Reimplement psb_gem_create()Thomas Zimmermann
Implement psb_gem_create() for general use. Create the GEM handle in psb_gem_create_dumb(). Allows to use psb_gem_create() for creating all of the GEM objects. While at it, clean-up drm_gem_dumb_create() to make it more readable. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-4-tzimmermann@suse.de
2021-10-19drm/gma500: Use to_gtt_range() everywhereThomas Zimmermann
Convert upcasts from struct drm_gem_object to struct gtt_range to to_gtt_range(). Some places used container_of() directly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-3-tzimmermann@suse.de
2021-10-19drm/gma500: Move helpers for struct gtt_range from gtt.c to gem.cThomas Zimmermann
Allocation and pinning helpers for struct gtt_range are GEM functions, so move them to gem.c. No functional changes. v2: * keep docs for psb_gtt_{attach,detach}_pages() (Patrik) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-2-tzimmermann@suse.de
2021-10-04Revert "drm/gma500: cleanup: drm_modeset_lock_all() --> ↵Sean Paul
DRM_MODESET_LOCK_ALL_BEGIN()" This reverts commit 4f9e860e6ad65ff4ea8ce165a1407d96ff1b2211. This patchset breaks on intel platforms and was previously NACK'd by Ville. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Fernando Ramos <greenfoo@u92.eu> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20211002154542.15800-3-sean@poorly.run
2021-10-01drm/gma500: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and DRM_MODESET_LOCK_ALL_END() Signed-off-by: Fernando Ramos <greenfoo@u92.eu> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210924064324.229457-15-greenfoo@u92.eu
2021-09-24drm/gma500: Fix wrong pointer passed to PTR_ERR()Yang Yingliang
PTR_ERR() should access the value just tested by IS_ERR(), otherwise the wrong error code will be returned. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: c2f17e60cbe1 ("drm/gma500: Embed struct drm_device in struct drm_psb_private") Reported-by: Hulk Robot <hulkci@huawei.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210924094040.3631675-1-yangyingliang@huawei.com
2021-09-23drm/gma500: Managed device releaseThomas Zimmermann
Set up a clean-up action to automatically release device resources during driver shutdown. Remove manual release code. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-6-tzimmermann@suse.de
2021-09-23drm/gma500: Remove dev_priv branch from unload functionThomas Zimmermann
The value of dev_priv in psb_driver_unload() is always non-zero. Remove the respective test. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-5-tzimmermann@suse.de
2021-09-23drm/gma500: Embed struct drm_device in struct drm_psb_privateThomas Zimmermann
Embed struct drm_device in struct drm_psb_private. Replace the use of dev_private by an upcast operation. Switch to managed release of struct drm_psb_private. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-4-tzimmermann@suse.de
2021-09-23drm/gma500: Disable PCI device during shutdownThomas Zimmermann
Use managed disablement of PCI devices via pcim_device_enable(). Disables the PCI device and simplifies error rollback in probe function. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-3-tzimmermann@suse.de
2021-09-23drm/gma500: Replace references to dev_private with helper functionThomas Zimmermann
Replace most references to struct drm_device.dev_private with the new helper function to_drm_psb_private(). The only references left are in assignments and the helper itself. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-2-tzimmermann@suse.de
2021-08-10drm/gma500: Convert to Linux IRQ interfacesThomas Zimmermann
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210803090704.32152-6-tzimmermann@suse.de
2021-07-09drm/gma500: Add the missed drm_gem_object_put() in psb_user_framebuffer_create()Jing Xiangfeng
psb_user_framebuffer_create() misses to call drm_gem_object_put() in an error path. Add the missed function call to fix it. Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210629115956.15160-1-jingxiangfeng@huawei.com
2021-07-09drm/gma500: Fix end of loop tests for list_for_each_entryHarshvardhan Jha
The list_for_each_entry() iterator, "connector" in this code, can never be NULL. If we exit the loop without finding the correct connector then "connector" points invalid memory that is an offset from the list head. This will eventually lead to memory corruption and presumably a kernel crash. Fixes: 9bd81acdb648 ("gma500: Convert Oaktrail to work with new output handling") Signed-off-by: Harshvardhan Jha <harshvardhan.jha@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210709073959.11443-1-harshvardhan.jha@oracle.com
2021-06-18drm/gma500/oaktrail_lvds: replace continue with breakColin Ian King
Currently a loop scans through the connector list checking for connectors that do not match a specific criteria. The use of the continue statement is a little unintuitive and can confuse static analysis checking. Invert the criteria matching logic and use a break to terminate the loop once the first suitable connector has been found. Thanks to Patrik Jakobsson for explaining the original intent of the code and suggesting this change. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210618183524.590186-1-colin.king@canonical.com
2021-05-06drm/gma500: update comment of psb_spank()Wan Jiabing
In commit 5c209d8056b9 ("drm/gma500: psb_spank() doesn't need it's own file"), accel_2d.c was deleted and psb_spank() was moved into psb_drv.c. Fix the comment here. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210506112851.20315-1-wanjiabing@vivo.com
2021-04-22drm/gma500: remove trailing whitespacesKrzysztof Kozlowski
Remove trailing whitespaces. No functional change. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210419081807.68000-2-krzysztof.kozlowski@canonical.com
2021-04-22drm/gma500: correct kerneldocKrzysztof Kozlowski
Correct kerneldoc (remove wrong /** marker and adjust function name) to fix W=1 warnings: drivers/gpu/drm/gma500/cdv_intel_lvds.c:27: warning: expecting prototype for LVDS I2C backlight control macros(). Prototype was for BRIGHTNESS_MAX_LEVEL() instead drivers/gpu/drm/gma500/intel_gmbus.c:386: warning: expecting prototype for intel_gmbus_setup(). Prototype was for gma_intel_setup_gmbus() instead Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210419081807.68000-1-krzysztof.kozlowski@canonical.com
2021-04-08gma500: Use DEFINE_SPINLOCK() for spinlockGuobin Huang
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Guobin Huang <huangguobin4@huawei.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1617710114-48071-1-git-send-email-huangguobin4@huawei.com
2021-03-19drm/gma500: use NULL instead of using plain integer as pointerYang Li
This fixes the following sparse warnings: drivers/gpu/drm/gma500/psb_drv.c:303:56: warning: Using plain integer as NULL pointer Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/1615969652-80225-1-git-send-email-yang.lee@linux.alibaba.com
2021-03-16Merge tag 'drm-misc-next-2021-03-03' of ↵Dave Airlie
git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.13: UAPI Changes: Cross-subsystem Changes: Core Changes: - %p4cc printk format modifier - atomic: introduce drm_crtc_commit_wait, rework atomic plane state helpers to take the drm_commit_state structure - dma-buf: heaps rework to return a struct dma_buf - simple-kms: Add plate state helpers - ttm: debugfs support, removal of sysfs Driver Changes: - Convert drivers to shadow plane helpers - arc: Move to drm/tiny - ast: cursor plane reworks - gma500: Remove TTM and medfield support - mxsfb: imx8mm support - panfrost: MMU IRQ handling rework - qxl: rework to better handle resources deallocation, locking - sun4i: Add alpha properties for UI and VI layers - vc4: RPi4 CEC support - vmwgfx: doc cleanup Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20210303100600.dgnkadonzuvfnu22@gilmour
2021-02-22Merge tag 'platform-drivers-x86-v5.12-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: "Highlights: - Microsoft Surface devices System Aggregator Module support - SW_TABLET_MODE reporting improvements - thinkpad_acpi keyboard language setting support - platform / DPTF profile settings support: - Base / userspace API parts merged from Rafael's acpi-platform branch - thinkpad_acpi and ideapad-laptop support through pdx86 - Remove support for some obsolete Intel MID platforms through merging of the shared intel-mid-removal branch - Big cleanup of the ideapad-laptop driver - Misc other fixes / new hw support / quirks" * tag 'platform-drivers-x86-v5.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (99 commits) platform/x86: intel_scu_ipc: Increase virtual timeout from 3 to 5 seconds platform/surface: aggregator: Fix access of unaligned value tools/power/x86/intel-speed-select: Update version to 1.8 tools/power/x86/intel-speed-select: Add new command to get/set TRL tools/power/x86/intel-speed-select: Add new command turbo-mode Platform: OLPC: Constify static struct regulator_ops platform/surface: Add Surface Hot-Plug driver platform/x86: intel_scu_wdt: Drop mistakenly added const platform/x86: Kconfig: add missing selects for ideapad-laptop platform/x86: acer-wmi: Don't use ACPI_EXCEPTION() platform/x86: thinkpad_acpi: Replace ifdef CONFIG_ACPI_PLATFORM_PROFILE with depends on platform/x86: thinkpad_acpi: Fix 'warning: no previous prototype for' warnings platform/x86: msi-wmi: Fix variable 'status' set but not used compiler warning platform/surface: surface3-wmi: Fix variable 'status' set but not used compiler warning platform/x86: Move all dell drivers to their own subdirectory Documentation/ABI: sysfs-platform-ideapad-laptop: conservation_mode attribute Documentation/ABI: sysfs-platform-ideapad-laptop: update device attribute paths platform/x86: ideapad-laptop: add "always on USB charging" control support platform/x86: ideapad-laptop: add keyboard backlight control support platform/x86: ideapad-laptop: send notification about touchpad state change to sysfs ...
2021-02-09drm/gma500: Remove dependency on TTMThomas Zimmermann
The gma500 driver does not use TTM. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-6-tzimmermann@suse.de (cherry picked from commit 8180cc3752329a599b168ba0f8b93baec9054cdd) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-02-09drm/gma500: Remove CONFIG_X86 conditionals from source filesThomas Zimmermann
Remove the CONFIG_X86 conditionals from the source code. The driver already depends on X86 in the Kconfig file. Also, no one has been trying to build it on a non-x86 platform recently, or they would have noticed that drm_ttm_cache_flush() doesn't exist. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-5-tzimmermann@suse.de (cherry picked from commit 6455af65e978479336309f6c83ce1fc632a2f535) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-02-09drm/gma500: Drop DRM_GMA3600 config optionThomas Zimmermann
With support for the MID-related chips removed, only support for desktop chips is left in the driver. So just build the complete driver if DRM_GMA500 has been selected. Anyone who wants to enable the Poulsbo code would probably also want the Cedarview code. [Patrik: Fixed conflict due to Oaktrail not being dropped] Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-4-tzimmermann@suse.de (cherry picked from commit 837f23bb4b6002fe2be5dd70de7735133e0f2f28) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-02-09drm/gma500: Remove Medfield supportThomas Zimmermann
Medfield is an outdated mobile platform with apparently no users left. Remove it from gma500. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-2-tzimmermann@suse.de (cherry picked from commit b51035c200bd3423ae5b6b98b54735ef424dc746) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2021-02-09drm/gma500: Never wait for blitsPatrik Jakobsson
Blits cannot happen anymore since we removed the 2d accel code. Stop checking for a busy blitter and remove the remaining blitter code. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-6-patrik.r.jakobsson@gmail.com
2021-02-09drm/gma500: psb_spank() doesn't need it's own filePatrik Jakobsson
Since everything else in accel_2d.c got removed we can move psb_spank() into psb_drv.c where it is used. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-5-patrik.r.jakobsson@gmail.com
2021-02-09drm/gma500: Unify crtc helpersPatrik Jakobsson
CDV crtc helpers are identical to other chips so use gma_ prefix for the crtc helper struct and remove the CDV copy. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-4-patrik.r.jakobsson@gmail.com
2021-02-09drm/gma500/cdv: Remove unused tv out pathsPatrik Jakobsson
Afaik tv out is not available on Cedarview and the code isn't doing anything so remove it. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-3-patrik.r.jakobsson@gmail.com
2021-02-09drm/gma500: Remove unused DPST supportPatrik Jakobsson
DPST never got enabled so remove it. We keep the reg save/restore code just for safety. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-2-patrik.r.jakobsson@gmail.com
2021-02-09drm/gma500/cdv: Remove unused code for crt initPatrik Jakobsson
Clearly never been used so just remove it. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-1-patrik.r.jakobsson@gmail.com
2021-02-09drm/gma500: Drop DRM_GMA600 config optionThomas Zimmermann
With support for the MID-only Medfield chips removed, simply build the complete driver if DRM_GMA500 has been selected. Anyone who wants to enable one of the chips would probably also want the rest. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes: 837f23bb4b60 ("drm/gma500: Drop DRM_GMA3600 config option") Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210209112721.3421-1-tzimmermann@suse.de
2021-02-09drm/gma500: Remove in_atomic() usage.Sebastian Andrzej Siewior
The driver is using msleep() if it is safe to use based on in_atomic(). This is not needed this macro is only used from i2c_algorithm::master_xfer() which is always invoked from preemptible context. Remove in_atomic() because it is superfluous. Remove wait_for_atomic() because it has no users. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210208233119.391103-2-bigeasy@linutronix.de
2021-02-01drm/gma500: Remove dependency on TTMThomas Zimmermann
The gma500 driver does not use TTM. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-6-tzimmermann@suse.de
2021-02-01drm/gma500: Remove CONFIG_X86 conditionals from source filesThomas Zimmermann
Remove the CONFIG_X86 conditionals from the source code. The driver already depends on X86 in the Kconfig file. Also, no one has been trying to build it on a non-x86 platform recently, or they would have noticed that drm_ttm_cache_flush() doesn't exist. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-5-tzimmermann@suse.de
2021-02-01drm/gma500: Drop DRM_GMA3600 config optionThomas Zimmermann
With support for the MID-related chips removed, only support for desktop chips is left in the driver. So just build the complete driver if DRM_GMA500 has been selected. Anyone who wants to enable the Poulsbo code would probably also want the Cedarview code. [Patrik: Fixed conflict due to Oaktrail not being dropped] Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-4-tzimmermann@suse.de
2021-02-01drm/gma500: Remove Medfield supportThomas Zimmermann
Medfield is an outdated mobile platform with apparently no users left. Remove it from gma500. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-2-tzimmermann@suse.de
2021-01-25drm/gma500: Get rid of duplicate NULL checksAndy Shevchenko
Since GPIOs are optional we don't need to repeat checks that are done in the GPIO API. Remove them for good. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2021-01-25drm/gma500: Convert to use new SCU IPC APIAndy Shevchenko
Convert the GMA500 driver to use the new SCU IPC API. This allows us to get rid of the duplicate PMC IPC implementation which is now covered in SCU IPC driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
2021-01-18drm/gma500/mdfld_intel_display: Demote three kernel-doc formatting abusesLee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/gma500/mdfld_intel_display.c:103: warning: Function parameter or member 'dev' not described in 'psb_intel_panel_fitter_pipe' drivers/gpu/drm/gma500/mdfld_intel_display.c:273: warning: Function parameter or member 'crtc' not described in 'mdfld_crtc_dpms' drivers/gpu/drm/gma500/mdfld_intel_display.c:273: warning: Function parameter or member 'mode' not described in 'mdfld_crtc_dpms' drivers/gpu/drm/gma500/mdfld_intel_display.c:609: warning: Function parameter or member 'crtc' not described in 'mdfldFindBestPLL' drivers/gpu/drm/gma500/mdfld_intel_display.c:609: warning: Function parameter or member 'target' not described in 'mdfldFindBestPLL' drivers/gpu/drm/gma500/mdfld_intel_display.c:609: warning: Function parameter or member 'refclk' not described in 'mdfldFindBestPLL' drivers/gpu/drm/gma500/mdfld_intel_display.c:609: warning: Function parameter or member 'best_clock' not described in 'mdfldFindBestPLL' Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Eric Anholt <eric@anholt.net> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-23-lee.jones@linaro.org
2021-01-18drm/gma500/mdfld_dsi_output: Demote a couple of kernel-doc formatting abusesLee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/gma500/mdfld_dsi_output.c:71: warning: Function parameter or member 'dev' not described in 'mdfld_dsi_gen_fifo_ready' drivers/gpu/drm/gma500/mdfld_dsi_output.c:71: warning: Function parameter or member 'gen_fifo_stat_reg' not described in 'mdfld_dsi_gen_fifo_ready' drivers/gpu/drm/gma500/mdfld_dsi_output.c:71: warning: Function parameter or member 'fifo_stat' not described in 'mdfld_dsi_gen_fifo_ready' drivers/gpu/drm/gma500/mdfld_dsi_output.c:95: warning: Function parameter or member 'dsi_config' not described in 'mdfld_dsi_brightness_init' drivers/gpu/drm/gma500/mdfld_dsi_output.c:95: warning: Function parameter or member 'pipe' not described in 'mdfld_dsi_brightness_init' Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: jim liu <jim.liu@intel.com> Cc: Jackie Li <yaodong.li@intel.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-22-lee.jones@linaro.org