diff options
| author | Dave Airlie <airlied@redhat.com> | 2019-08-09 16:04:15 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2019-08-09 16:04:31 +1000 |
| commit | b0383c0653c4bd2d2732c5767ec8fa223b3d6efd (patch) | |
| tree | 213d1647c83a9bdbe9446d7ab81d9c80a44be188 /drivers/gpu/drm/mga | |
| parent | dce14e36aea23183ccd315fbc6b0fca027bf73f5 (diff) | |
| parent | cc8f12996e24b102a086a253055ecc58c437c31d (diff) | |
| download | blackbird-op-linux-b0383c0653c4bd2d2732c5767ec8fa223b3d6efd.tar.gz blackbird-op-linux-b0383c0653c4bd2d2732c5767ec8fa223b3d6efd.zip | |
Merge tag 'drm-misc-next-2019-08-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.4:
UAPI Changes:
- HDCP: Add a Content protection type property
Cross-subsystem Changes:
Core Changes:
- Continue to rework the include dependencies
- fb: Remove the unused drm_gem_fbdev_fb_create function
- drm-dp-helper: Make the link rate calculation more tolerant to
non-explicitly defined, yet supported, rates
- fb-helper: Map DRM client buffer only when required, and instanciate a
shadow buffer when the device has a dirty function or says so
- connector: Add a helper to link the DDC adapter used by that connector to
the userspace
- vblank: Switch from DRM_WAIT_ON to wait_event_interruptible_timeout
- dma-buf: Fix a stack corruption
- ttm: Embed a drm_gem_object struct to make ttm_buffer_object a
superclass of GEM, and convert drivers to use it.
- hdcp: Improvements to report the content protection type to the
userspace
Driver Changes:
- Remove drm_gem_prime_import/export from being defined in the drivers
- Drop DRM_AUTH usage from drivers
- Continue to drop drmP.h
- Convert drivers to the connector ddc helper
- ingenic: Add support for more panel-related cases
- komeda: Support for dual-link
- lima: Reduce logging
- mpag200: Fix the cursor support
- panfrost: Export GPU features register to userspace through an ioctl
- pl111: Remove the CLD pads wiring support from the DT
- rockchip: Rework to use DRM PSR helpers, fix a bug in the VOP_WIN_GET
macro
- sun4i: Improve support for color encoding and range
- tinydrm: Rework SPI support, improve MIPI-DBI support, move to drm/tiny
- vkms: Rework of the CRC tracking
- bridges:
- sii902x: Add support for audio graph card
- tc358767: Rework AUX data handling code
- ti-sn65dsi86: Add Debugfs and proper DSI mode flags support
- panels
- Support for GiantPlus GPM940B0, Sharp LQ070Y3DG3B, Ortustech
COM37H3M, Novatek NT39016, Sharp LS020B1DD01D, Raydium RM67191,
Boe Himax8279d, Sharp LD-D5116Z01B
- Conversion of the device tree bindings to the YAML description
- jh057n00900: Rework the enable / disable path
- fbdev:
- ssd1307fb: Support more devices based on that controller
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190808121423.xzpedzkpyecvsiy4@flea
Diffstat (limited to 'drivers/gpu/drm/mga')
| -rw-r--r-- | drivers/gpu/drm/mga/mga_dma.c | 13 | ||||
| -rw-r--r-- | drivers/gpu/drm/mga/mga_drv.c | 7 | ||||
| -rw-r--r-- | drivers/gpu/drm/mga/mga_drv.h | 27 | ||||
| -rw-r--r-- | drivers/gpu/drm/mga/mga_ioc32.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/mga/mga_irq.c | 12 | ||||
| -rw-r--r-- | drivers/gpu/drm/mga/mga_state.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/mga/mga_warp.c | 4 |
7 files changed, 41 insertions, 33 deletions
diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c index 1ffdafea27e4..85c74364ce24 100644 --- a/drivers/gpu/drm/mga/mga_dma.c +++ b/drivers/gpu/drm/mga/mga_dma.c @@ -35,8 +35,8 @@ * \author Gareth Hughes <gareth@valinux.com> */ -#include <drm/drmP.h> -#include <drm/mga_drm.h> +#include <linux/delay.h> + #include "mga_drv.h" #define MGA_DEFAULT_USEC_TIMEOUT 10000 @@ -62,7 +62,7 @@ int mga_do_wait_for_idle(drm_mga_private_t *dev_priv) MGA_WRITE8(MGA_CRTC_INDEX, 0); return 0; } - DRM_UDELAY(1); + udelay(1); } #if MGA_DMA_DEBUG @@ -114,7 +114,7 @@ void mga_do_dma_flush(drm_mga_private_t *dev_priv) status = MGA_READ(MGA_STATUS) & MGA_ENGINE_IDLE_MASK; if (status == MGA_ENDPRDMASTS) break; - DRM_UDELAY(1); + udelay(1); } if (primary->tail == primary->last_flush) { @@ -1120,7 +1120,7 @@ int mga_dma_buffers(struct drm_device *dev, void *data, */ if (d->send_count != 0) { DRM_ERROR("Process %d trying to send %d buffers via drmDMA\n", - DRM_CURRENTPID, d->send_count); + task_pid_nr(current), d->send_count); return -EINVAL; } @@ -1128,7 +1128,8 @@ int mga_dma_buffers(struct drm_device *dev, void *data, */ if (d->request_count < 0 || d->request_count > dma->buf_count) { DRM_ERROR("Process %d trying to get %d buffers (of %d max)\n", - DRM_CURRENTPID, d->request_count, dma->buf_count); + task_pid_nr(current), d->request_count, + dma->buf_count); return -EINVAL; } diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c index 6e1d1054ad06..71128e6f6ae9 100644 --- a/drivers/gpu/drm/mga/mga_drv.c +++ b/drivers/gpu/drm/mga/mga_drv.c @@ -31,12 +31,11 @@ #include <linux/module.h> -#include <drm/drmP.h> -#include <drm/mga_drm.h> -#include "mga_drv.h" - +#include <drm/drm_drv.h> #include <drm/drm_pciids.h> +#include "mga_drv.h" + static struct pci_device_id pciidlist[] = { mga_PCI_IDS }; diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h index a45bb22275a7..d5deecb93975 100644 --- a/drivers/gpu/drm/mga/mga_drv.h +++ b/drivers/gpu/drm/mga/mga_drv.h @@ -31,7 +31,20 @@ #ifndef __MGA_DRV_H__ #define __MGA_DRV_H__ +#include <linux/irqreturn.h> +#include <linux/slab.h> + +#include <drm/drm_agpsupport.h> +#include <drm/drm_device.h> +#include <drm/drm_file.h> +#include <drm/drm_ioctl.h> +#include <drm/drm_irq.h> #include <drm/drm_legacy.h> +#include <drm/drm_pci.h> +#include <drm/drm_print.h> +#include <drm/drm_sarea.h> +#include <drm/drm_vblank.h> +#include <drm/mga_drm.h> /* General customization: */ @@ -188,7 +201,7 @@ extern int mga_warp_init(drm_mga_private_t *dev_priv); extern int mga_enable_vblank(struct drm_device *dev, unsigned int pipe); extern void mga_disable_vblank(struct drm_device *dev, unsigned int pipe); extern u32 mga_get_vblank_counter(struct drm_device *dev, unsigned int pipe); -extern int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence); +extern void mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence); extern int mga_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence); extern irqreturn_t mga_driver_irq_handler(int irq, void *arg); extern void mga_driver_irq_preinstall(struct drm_device *dev); @@ -199,10 +212,14 @@ extern long mga_compat_ioctl(struct file *filp, unsigned int cmd, #define mga_flush_write_combine() wmb() -#define MGA_READ8(reg) DRM_READ8(dev_priv->mmio, (reg)) -#define MGA_READ(reg) DRM_READ32(dev_priv->mmio, (reg)) -#define MGA_WRITE8(reg, val) DRM_WRITE8(dev_priv->mmio, (reg), (val)) -#define MGA_WRITE(reg, val) DRM_WRITE32(dev_priv->mmio, (reg), (val)) +#define MGA_READ8(reg) \ + readb(((void __iomem *)dev_priv->mmio->handle) + (reg)) +#define MGA_READ(reg) \ + readl(((void __iomem *)dev_priv->mmio->handle) + (reg)) +#define MGA_WRITE8(reg, val) \ + writeb(val, ((void __iomem *)dev_priv->mmio->handle) + (reg)) +#define MGA_WRITE(reg, val) \ + writel(val, ((void __iomem *)dev_priv->mmio->handle) + (reg)) #define DWGREG0 0x1c00 #define DWGREG0_END 0x1dff diff --git a/drivers/gpu/drm/mga/mga_ioc32.c b/drivers/gpu/drm/mga/mga_ioc32.c index 245fb2e359cf..6ccd270789c6 100644 --- a/drivers/gpu/drm/mga/mga_ioc32.c +++ b/drivers/gpu/drm/mga/mga_ioc32.c @@ -30,10 +30,9 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ + #include <linux/compat.h> -#include <drm/drmP.h> -#include <drm/mga_drm.h> #include "mga_drv.h" typedef struct drm32_mga_init { diff --git a/drivers/gpu/drm/mga/mga_irq.c b/drivers/gpu/drm/mga/mga_irq.c index 693ba708cfed..a7e6ffc80a78 100644 --- a/drivers/gpu/drm/mga/mga_irq.c +++ b/drivers/gpu/drm/mga/mga_irq.c @@ -31,8 +31,6 @@ * Eric Anholt <anholt@FreeBSD.org> */ -#include <drm/drmP.h> -#include <drm/mga_drm.h> #include "mga_drv.h" u32 mga_get_vblank_counter(struct drm_device *dev, unsigned int pipe) @@ -118,23 +116,21 @@ void mga_disable_vblank(struct drm_device *dev, unsigned int pipe) /* MGA_WRITE(MGA_IEN, MGA_VLINEIEN | MGA_SOFTRAPEN); */ } -int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence) +void mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence) { drm_mga_private_t *dev_priv = (drm_mga_private_t *) dev->dev_private; unsigned int cur_fence; - int ret = 0; /* Assume that the user has missed the current sequence number * by about a day rather than she wants to wait for years * using fences. */ - DRM_WAIT_ON(ret, dev_priv->fence_queue, 3 * HZ, + wait_event_timeout(dev_priv->fence_queue, (((cur_fence = atomic_read(&dev_priv->last_fence_retired)) - - *sequence) <= (1 << 23))); + - *sequence) <= (1 << 23)), + msecs_to_jiffies(3000)); *sequence = cur_fence; - - return ret; } void mga_driver_irq_preinstall(struct drm_device *dev) diff --git a/drivers/gpu/drm/mga/mga_state.c b/drivers/gpu/drm/mga/mga_state.c index e5f6b735f575..77a0b006f066 100644 --- a/drivers/gpu/drm/mga/mga_state.c +++ b/drivers/gpu/drm/mga/mga_state.c @@ -32,8 +32,6 @@ * Gareth Hughes <gareth@valinux.com> */ -#include <drm/drmP.h> -#include <drm/mga_drm.h> #include "mga_drv.h" /* ================================================================ @@ -1016,7 +1014,7 @@ int mga_getparam(struct drm_device *dev, void *data, struct drm_file *file_priv) return -EINVAL; } - DRM_DEBUG("pid=%d\n", DRM_CURRENTPID); + DRM_DEBUG("pid=%d\n", task_pid_nr(current)); switch (param->param) { case MGA_PARAM_IRQ_NR: @@ -1048,7 +1046,7 @@ static int mga_set_fence(struct drm_device *dev, void *data, struct drm_file *fi return -EINVAL; } - DRM_DEBUG("pid=%d\n", DRM_CURRENTPID); + DRM_DEBUG("pid=%d\n", task_pid_nr(current)); /* I would normal do this assignment in the declaration of fence, * but dev_priv may be NULL. @@ -1077,7 +1075,7 @@ file_priv) return -EINVAL; } - DRM_DEBUG("pid=%d\n", DRM_CURRENTPID); + DRM_DEBUG("pid=%d\n", task_pid_nr(current)); mga_driver_fence_wait(dev, fence); return 0; diff --git a/drivers/gpu/drm/mga/mga_warp.c b/drivers/gpu/drm/mga/mga_warp.c index 0b76352260a9..b5ef1d2c8b1c 100644 --- a/drivers/gpu/drm/mga/mga_warp.c +++ b/drivers/gpu/drm/mga/mga_warp.c @@ -29,11 +29,9 @@ #include <linux/firmware.h> #include <linux/ihex.h> -#include <linux/platform_device.h> #include <linux/module.h> +#include <linux/platform_device.h> -#include <drm/drmP.h> -#include <drm/mga_drm.h> #include "mga_drv.h" #define FIRMWARE_G200 "matrox/g200_warp.fw" |

