summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mgag200/mgag200_drv.c
AgeCommit message (Collapse)Author
2021-11-27drm: Move nomodeset kernel parameter to the DRM subsystemJavier Martinez Canillas
The "nomodeset" kernel cmdline parameter is handled by the vgacon driver but the exported vgacon_text_force() symbol is only used by DRM drivers. It makes much more sense for the parameter logic to be in the subsystem of the drivers that are making use of it. Let's move the vgacon_text_force() function and related logic to the DRM subsystem. While doing that, rename it to drm_firmware_drivers_only() and make it return true if "nomodeset" was used and false otherwise. This is a better description of the condition that the drivers are testing for. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patchwork.freedesktop.org/patch/msgid/20211112133230.1595307-4-javierm@redhat.com
2021-07-05drm/mgag200: Extract device type and flags in mgag200_pci_probe()Thomas Zimmermann
The type and flags values are stored in the PCI ID list. Extract them in the probe function. Makes the device initialization more readable. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210702075642.27834-4-tzimmermann@suse.de
2021-07-05drm/mgag200: Inline mgag200_device_init()Thomas Zimmermann
Inline mgag200_device_init() into mgag200_device_create(), which is the only caller. Also remove a duplicate error message for mgag200_modeset_init(). The function will print an error if/where it failed. v2: * include a note about the removed error message in changelog (Sam) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210702075642.27834-3-tzimmermann@suse.de
2021-07-05drm/mgag200: Don't pass flags to drm_dev_register()Thomas Zimmermann
The flags argument is only relevant for UMS drivers. Pass 0. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210702075642.27834-2-tzimmermann@suse.de
2021-07-01drm/aperture: Pass DRM driver structure instead of driver nameThomas Zimmermann
Print the name of the DRM driver when taking over fbdev devices. Makes the output to dmesg more consistent. Note that the driver name is only used for printing a string to the kernel log. No UAPI is affected by this change. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Nirmoy Das <nirmoy.das@amd.com> Acked-by: Chen-Yu Tsai <wens@csie.org> # sun4i Acked-by: Neil Armstrong <narmstrong@baylibre.com> # meson Link: https://patchwork.freedesktop.org/patch/msgid/20210629135833.22679-1-tzimmermann@suse.de
2021-04-14drm/aperture: Convert drivers to aperture interfacesThomas Zimmermann
Mass-convert all drivers from FB helpers to aperture interfaces. No functional changes besides checking for returned errno codes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210412131043.5787-3-tzimmermann@suse.de
2021-01-06drm/mgag200: Remove references to struct drm_device.pdevThomas Zimmermann
Using struct drm_device.pdev is deprecated. Convert mgag200 to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20201201103542.2182-13-tzimmermann@suse.de
2020-11-24drm/shmem-helper: Removed drm_gem_shmem_create_object_cached()Thomas Zimmermann
Cached page mappings are now the default for SHMEM GEM objects. Remove the obsolete create function for cached mappings. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20201117133156.26822-3-tzimmermann@suse.de
2020-11-06drm/<drivers>: Constify struct drm_driverDaniel Vetter
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 <sam@ravnborg.org> Cc: kernel test robot <lkp@intel.com> Acked-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Dave Airlie <airlied@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: virtualization@lists.linux-foundation.org Cc: Harry Wentland <harry.wentland@amd.com> Cc: Leo Li <sunpeng.li@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Eric Anholt <eric@anholt.net> Cc: Maxime Ripard <mripard@kernel.org> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: nouveau@lists.freedesktop.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-5-daniel.vetter@ffwll.ch
2020-08-27drm/mgag200: fix spelling mistake "expeced" -> "expected"Colin Ian King
There is a spelling mistake in a drm_warn message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20200826084727.42703-1-colin.king@canonical.com
2020-08-07drm/mgag200: fix build on alpha archSam Ravnborg
When building imgag200 for the alpha architecture it fails like this: mgag200_drv.c:233:9: error: implicit declaration of function ‘vmalloc’ 233 | bios = vmalloc(size); | ^~~~~~~ | kmalloc When building for other architectures vmalloc.h is pulled in via some other header file - for example asm-generic/io.h. Use an explicit include of vmalloc.h to fix the build. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Fixes: e20dfd27f7aa ("drm/mgag200: Add support for G200 desktop cards") Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Egbert Eich <eich@suse.com> Cc: Takashi Iwai <tiwai@suse.de> Cc: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200807180547.GA923146@ravnborg.org
2020-08-05drm/mgag200: Set PCI option register in G200SE modelsThomas Zimmermann
The initial value of the PCI option register got lost while refactoring the driver init code. Restore the setting. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Dave Airlie <airlied@redhat.com> Reported-by: kernel test robot <lkp@intel.com> Fixes: 2021708e0d6e ("drm/mgag200: Initialize PCI registers early during device setup") Cc: Lyude Paul <lyude@redhat.com> Cc: Dave Airlie <airlied@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200804065158.21049-1-tzimmermann@suse.de
2020-08-03drm/mgag200: Add support for G200 desktop cardsThomas Zimmermann
This patch adds support for G200 desktop cards. We can reuse the whole memory and modesetting code. A few PCI and DAC register values have to be updated accordingly. The most significant change is in the PLL setup. The driver parses the device's BIOS to retrieve clock limits and reference clocks. With no BIOS found, safe defaults are being used. v2: * copy BIOS ROM to system memory and access with regular load/store; resolves potential HW limitations * fix some stray whitespaces Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Co-developed-by: Egbert Eich <eich@suse.com> Signed-off-by: Egbert Eich <eich@suse.com> Co-developed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-9-tzimmermann@suse.de
2020-08-03drm/mgag200: Move G200SE's unique id into model-specific dataThomas Zimmermann
The unique revision id is only useful for G200SE devices. Store the value in model-specific data within struct mga_device. While at it, the patch also adds an init helper for the value. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-8-tzimmermann@suse.de
2020-08-03drm/mgag200: Enable MGA mode during device register initializationThomas Zimmermann
MGA cards can run in traditional VGA mode or an enhanced MGA mode; with the latter being required for KMS. So far, MGA mode was enabled during modesetting. As it's fundamental for device operation, the patch moves it next to the device register setup. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-5-tzimmermann@suse.de
2020-08-03drm/mgag200: Initialize PCI registers early during device setupThomas Zimmermann
So far, PCI option registers were initialized as part of modesetting, which is late in the process. As these registers control fundamental operation, they should be set early. The patch moves the PCI option handling into device register setup, before even the device MMIO memory is being mapped. No functional changes made. Moving the PCI code next to the device-register setup also allows to remove the has_sdram field from struct mga_device. The state is now local to the init helper. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-4-tzimmermann@suse.de
2020-08-03drm/mgag200: Move register initialization into helper functionThomas Zimmermann
The mgag200 driver maps registers into the address space. Move the code into a separate helper function. No functional changes. One small difference is in the handling of SDRAM/SGRAM. MGA devices can come with either SDRAM or SGRAM. So far, the driver checked for SDRAM, which is the common case. The patch moves this code into a separate helper and checks for SGRAM, which is the special case. The test itself is the same as before. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-3-tzimmermann@suse.de
2020-08-03drm/mgag200: Enable caching for SHMEM pagesThomas Zimmermann
SHMEM pages use write-combine caching by default, but can also use the platform's default page caching. Doing so may improve the performance of I/O on the framebuffer. Mgag200's hardware does not access framebuffer pages directly (i.e., via DMA), so enabling caching does not have an effect on consistency of the framebuffer memory or the displayed data. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200730102844.10995-2-tzimmermann@suse.de
2020-06-11drm/mgag200: Use managed device initializationThomas Zimmermann
The mgag200 driver now uses managed functions for DRM devices. The individual helpers for modesetting and memory managed are already covered, so only device allocation and initialization is left for conversion. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-15-tzimmermann@suse.de
2020-06-11drm/mgag200: Embed instance of struct drm_device in struct mga_deviceThomas Zimmermann
Following current best practice, the instance of struct drm_device is now embedded in struct mga_device. The respective field has been renamed from 'dev' to 'base' to reflect the relationship. Conversion from DRM device is done via upcast. Using dev_private is no longer possible. The patch also open-codes drm_dev_alloc() and DRM device initialization is now performed by a call to drm_device_init(). Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-14-tzimmermann@suse.de
2020-06-11drm/mgag200: Allocate device structures in mgag200_driver_load()Thomas Zimmermann
Instances of struct drm_device and struct mga_device are now allocated next to each other in mgag200_driver_load(). Yet another preparation before embedding the DRM device instance in struct mga_device. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-13-tzimmermann@suse.de
2020-06-11drm/mgag200: Separate device initialization into allocationThomas Zimmermann
Embedding the DRM device instance in struct mga_device will require changes to device allocation. Moving the device initialization into its own functions gets it out of the way. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-12-tzimmermann@suse.de
2020-06-11drm/mgag200: Move device init and cleanup to mgag200_drv.cThomas Zimmermann
Moving the initializer and cleanup functions for device instances to mgag200_drv.c prepares for the conversion to managed code. No functional changes are made. Remove mgag200_main.c, which is now empty. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-11-tzimmermann@suse.de
2020-06-11drm/mgag200: Prefix symbol names in mgag200_drv.c with mgag200_Thomas Zimmermann
The naming of symbols in mgag200_drv.c is inconsistent. Fix that by prefixing all names with mgag200_. v2: * clarify commit message Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-10-tzimmermann@suse.de
2020-06-11drm/mgag200: Separate DRM and PCI functionality from each otherThomas Zimmermann
Moving the DRM driver structures from the middle of the PCI code to the top of the file makes it more readable. Also remove an obsolete comment. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-9-tzimmermann@suse.de
2020-06-11drm/mgag200: Use pcim_enable_device()Thomas Zimmermann
Using the managed function simplifies the error handling. After unloading the driver, the PCI device should now get disabled as well. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-4-tzimmermann@suse.de
2020-05-19drm/mgag200: Replace VRAM helpers with SHMEM helpersThomas Zimmermann
The VRAM helpers managed the framebuffer memory for mgag200. This came with several problems, as some MGA device require the scanout address to be located at VRAM offset 0. It's incompatible with the page-flip semantics of DRM's atomic modesettting. With atomic modesetting, old and new framebuffers have to be located in VRAM at the same time. So at least one of them has to reside at a non-0 offset. This patch replaces VRAM helpers with SHMEM helpers. GEM SHMEM buffers reside in system memory, and are shadow-copied into VRAM during page flips. The shadow copy always starts at VRAM offset 0. v2: * revert dev->pdev changes Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: John Donnelly <John.p.donnelly@oracle.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-16-tzimmermann@suse.de
2020-05-19drm/mgag200: Convert to simple KMS helperThomas Zimmermann
The mgag200 supports a single pipeline with only a primary plane. It can be converted to simple KMS helpers. This also adds support for atomic modesetting. Wayland compositors, which use pageflip ioctls, can now be used with mgag200. v2: * prepare encoder and CRTC in a separate patch * remove suspend/resume code in a separate patch * don't call set_format_regs() in pipe_update() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Tested-by: John Donnelly <John.p.donnelly@oracle.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Emil Velikov <emil.velikov@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-15-tzimmermann@suse.de
2020-05-11drm/mgag200: Convert struct drm_device to struct mga_device with helperThomas Zimmermann
Mgag200 uses dev_private to look up struct mga_device for instances of struct drm_device. Use of dev_private is deprecated, so hide it in the helper function to_mga_device(). v2: * make to_mga_device() a function (Sam) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200507090315.21274-2-tzimmermann@suse.de
2020-04-08drm/mgag200: Set up fbdev after registering device; remove error checksThomas Zimmermann
Generic fbdev support is a DRM client. Set it up after registering the new DRM device. Remove the error checks as the driver's probe function should not depend on a DRM client's state. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200408082641.590-7-tzimmermann@suse.de
2020-01-07drm/mgag200: Add module parameter to pin all buffers at offset 0Thomas Zimmermann
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: Remove BO device from public interfaceThomas Zimmermann
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 Zimmermann
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-06drm/vram: Support scanline alignment for dumb buffersThomas Zimmermann
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
2019-12-17Merge tag 'drm-misc-next-2019-12-16' of ↵Daniel Vetter
git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.6: UAPI Changes: - Add support for DMA-BUF HEAPS. Cross-subsystem Changes: - mipi dsi definition updates, pulled into drm-intel as well. - Add lockdep annotations for dma_resv vs mmap_sem and fs_reclaim. - Remove support for dma-buf kmap/kunmap. - Constify fb_ops in all fbdev drivers, including drm drivers and drm-core, and media as well. Core Changes: - Small cleanups to ttm. - Fix SCDC definition. - Assorted cleanups to core. - Add todo to remove load/unload hooks, and use generic fbdev emulation. - Assorted documentation updates. - Use blocking ww lock in ttm fault handler. - Remove drm_fb_helper_fbdev_setup/teardown. - Warning fixes with W=1 for atomic. - Use drm_debug_enabled() instead of drm_debug flag testing in various drivers. - Fallback to nontiled mode in fbdev emulation when not all tiles are present. (Later on reverted) - Various kconfig indentation fixes in core and drivers. - Fix freeing transactions in dp-mst correctly. - Sean Paul is steping down as core maintainer. :-( - Add lockdep annotations for atomic locks vs dma-resv. - Prevent use-after-free for a bad job in drm_scheduler. - Fill out all block sizes in the P01x and P210 definitions. - Avoid division by zero in drm/rect, and fix bounds. - Add drm/rect selftests. - Add aspect ratio and alternate clocks for HDMI 4k modes. - Add todo for drm_framebuffer_funcs and fb_create cleanup. - Drop DRM_AUTH for prime import/export ioctls. - Clear DP-MST payload id tables downstream when initializating. - Fix for DSC throughput definition. - Add extra FEC definitions. - Fix fake offset in drm_gem_object_funs.mmap. - Stop using encoder->bridge in core directly - Handle bridge chaining slightly better. - Add backlight support to drm/panel, and use it in many panel drivers. - Increase max number of y420 modes from 128 to 256, as preparation to add the new modes. Driver Changes: - Small fixes all over. - Fix documentation in vkms. - Fix mmap_sem vs dma_resv in nouveau. - Small cleanup in komeda. - Add page flip support in gma500 for psb/cdv. - Add ddc symlink in the connector sysfs directory for many drivers. - Add support for analogic an6345, and fix small bugs in it. - Add atomic modesetting support to ast. - Fix radeon fault handler VMA race. - Switch udl to use generic shmem helpers. - Unconditional vblank handling for mcde. - Miscellaneous fixes to mcde. - Tweak debug output from komeda using debugfs. - Add gamma and color transform support to komeda for DOU-IPS. - Add support for sony acx424AKP panel. - Various small cleanups to gma500. - Use generic fbdev emulation in udl, and replace udl_framebuffer with generic implementation. - Add support for Logic PD Type 28 panel. - Use drm_panel_* wrapper functions in exynos/tegra/msm. - Add devicetree bindings for generic DSI panels. - Don't include drm_pci.h directly in many drivers. - Add support for begin/end_cpu_access in udmabuf. - Stop using drm_get_pci_dev in gma500 and mga200. - Fixes to UDL damage handling, and use dma_buf_begin/end_cpu_access. - Add devfreq thermal support to panfrost. - Fix hotplug with daisy chained monitors by removing VCPI when disabling topology manager. - meson: Add support for OSD1 plane AFBC commit. - Stop displaying garbage when toggling ast primary plane on/off. - More cleanups and fixes to UDL. - Add D32 suport to komeda. - Remove globle copy of drm_dev in gma500. - Add support for Boe Himax8279d MIPI-DSI LCD panel. - Add support for ingenic JZ4770 panel. - Small null pointer deference fix in ingenic. - Remove support for the special tfp420 driver, as there is a generic way to do it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/ba73535a-9334-5302-2e1f-5208bd7390bd@linux.intel.com
2019-12-06drm/mgag200: Flag all G200 SE A machines as broken wrt <startadd>Thomas Zimmermann
Several MGA G200 SE machines don't respect the value of the startadd register field. After more feedback on affected machines, neither PCI subvendor ID nor the internal ID seem to hint towards the bug. All affected machines have a PCI ID of 0x0522 (i.e., G200 SE A). It was decided to flag all G200 SE A machines as broken. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Fixes: 1591fadf857c ("drm/mgag200: Add workaround for HW that does not support 'startadd'") Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: John Donnelly <john.p.donnelly@oracle.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dave Airlie <airlied@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: "Y.C. Chen" <yc_chen@aspeedtech.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "José Roberto de Souza" <jose.souza@intel.com> Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Cc: dri-devel@lists.freedesktop.org Cc: <stable@vger.kernel.org> # v5.3+ Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Allison Randal <allison@lohutok.net> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Noralf Trønnes" <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191206081901.9938-1-tzimmermann@suse.de
2019-12-05drm/mgag200: Call mgag200_driver_{load, unload}() before registering deviceThomas Zimmermann
The load/unload callbacks in struct drm_driver are deprecated. Remove them and call functions explicitly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20191205090252.5711-1-tzimmermann@suse.de
2019-11-27drm/mgag200: Add workaround for HW that does not support 'startadd'Thomas Zimmermann
There's at least one system that does not interpret the value of the device's 'startadd' field correctly, which leads to incorrectly displayed scanout buffers. Always placing the active scanout buffer at offset 0 works around the problem. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reported-by: John Donnelly <john.p.donnelly@oracle.com> Tested-by: John Donnelly <john.p.donnelly@oracle.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Fixes: 81da87f63a1e ("drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin") Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dave Airlie <airlied@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: "Y.C. Chen" <yc_chen@aspeedtech.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "José Roberto de Souza" <jose.souza@intel.com> Cc: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Cc: dri-devel@lists.freedesktop.org Cc: <stable@vger.kernel.org> # v5.3+ Link: https://gitlab.freedesktop.org/drm/misc/issues/7 Link: https://patchwork.freedesktop.org/patch/msgid/20191126101529.20356-4-tzimmermann@suse.de
2019-10-17drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONSGerd Hoffmann
Not needed any more because we don't have vram specific fops any more. DEFINE_DRM_GEM_FOPS() can be used instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-12-kraxel@redhat.com
2019-08-23drm: drop resource_id parameter from ↵Gerd Hoffmann
drm_fb_helper_remove_conflicting_pci_framebuffers Not needed any more for remove_conflicting_pci_framebuffers calls. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190822090645.25410-3-kraxel@redhat.com
2019-06-30drm/mgag200: drop use of drmP.hSam Ravnborg
Drop use of the deprecated drmP.h header file. Replace with necessary include files to fix build. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190623103542.30697-5-sam@ravnborg.org
2019-06-19Merge v5.2-rc5 into drm-nextDaniel Vetter
Maarten needs -rc4 backmerged so he can pull in the fbcon notifier removal topic branch into drm-misc-next. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 377Thomas Gleixner
Based on 1 normalized pattern(s): this file is subject to the terms and conditions of the gnu general public license version 2 see the file copying in the main directory of this archive for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 9 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Armijn Hemel <armijn@tjaldur.nl> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531081036.888539456@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-15drm/mgag200: Convert mgag200 driver to VRAM MMThomas Zimmermann
The data structure |struct drm_vram_mm| and its helpers replace mgag200's TTM-based memory manager. It's the same implementation; except for the type names. v4: * don't select DRM_TTM or DRM_VRAM_MM_HELPER v3: * use drm_gem_vram_mm_funcs * convert driver to drm_device-based instance v2: * implement mgag200_mmap() with drm_vram_mm_mmap() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-16-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-05-15drm/mgag200: Convert mgag200 driver to |struct drm_gem_vram_object|Thomas Zimmermann
The data structure |struct drm_gem_vram_object| and its helpers replace |struct mgag200_bo|. It's the same implementation; except for the type names. v4: * cleanups from checkpatch.pl * select config option DRM_VRAM_HELPER Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: http://patchwork.freedesktop.org/patch/msgid/20190508082630.15116-15-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-09-03drm/mgag200: use simpler remove_conflicting_pci_framebuffers()Michał Mirosław
Remove duplicated call, while at it. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/90fc954f90de44157d6cc1c782147db6252c71e4.1535810304.git.mirq-linux@rere.qmqm.pl
2017-08-16drm/mgag200: Use the drm_driver.dumb_destroy defaultNoralf Trønnes
drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it. Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1502034068-51384-15-git-send-email-noralf@tronnes.org
2017-06-20drm/pci: Deprecate drm_pci_init/exit completelyDaniel Vetter
The magic switching between proper pci driver and shadow-attach isn't useful anymore since there's no ums+kms drivers left. Let's split this up properly, calling pci_register_driver for kms drivers and renaming the shadow-attach init to drm_legacy_pci_init/exit. Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-6-daniel.vetter@ffwll.ch
2017-06-20drm: Remove drm_driver->set_busid hookDaniel Vetter
The only special-case is pci devices, and we can easily handle this in the core. Do so and drop a pile of boilerplate from drivers. Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-5-daniel.vetter@ffwll.ch
2017-01-23drm/mgag200: Added support for the new device G200eH3Mathieu Larouche
- Added the new device ID - Added new pll algorithm Signed-off-by: Mathieu Larouche <mathieu.larouche@matrox.com> Signed-off-by: Dave Airlie <airlied@redhat.com>