Commit e8a1ca91 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-fixes-2021-08-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes



Short summary of fixes pull:

 * kmb: DMA fix; Add macros for driver date/version
 * vmwgfx: Fix I/O memory access on 64-bit systems

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YQrXzTmPpiuWsqSA@linux-uq9g.fritz.box
parents c500bee1 e89afb51
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ static irqreturn_t handle_lcd_irq(struct drm_device *dev)
	unsigned long status, val, val1;
	int plane_id, dma0_state, dma1_state;
	struct kmb_drm_private *kmb = to_kmb(dev);
	u32 ctrl = 0;

	status = kmb_read_lcd(kmb, LCD_INT_STATUS);

@@ -227,6 +228,19 @@ static irqreturn_t handle_lcd_irq(struct drm_device *dev)
				kmb_clr_bitmask_lcd(kmb, LCD_CONTROL,
						    kmb->plane_status[plane_id].ctrl);

				ctrl = kmb_read_lcd(kmb, LCD_CONTROL);
				if (!(ctrl & (LCD_CTRL_VL1_ENABLE |
				    LCD_CTRL_VL2_ENABLE |
				    LCD_CTRL_GL1_ENABLE |
				    LCD_CTRL_GL2_ENABLE))) {
					/* If no LCD layers are using DMA,
					 * then disable DMA pipelined AXI read
					 * transactions.
					 */
					kmb_clr_bitmask_lcd(kmb, LCD_CONTROL,
							    LCD_CTRL_PIPELINE_DMA);
				}

				kmb->plane_status[plane_id].disable = false;
			}
		}
@@ -412,9 +426,9 @@ static const struct drm_driver kmb_driver = {
	DRM_GEM_CMA_DRIVER_OPS_VMAP,
	.name = "kmb-drm",
	.desc = "KEEMBAY DISPLAY DRIVER",
	.date = "20201008",
	.major = 1,
	.minor = 0,
	.date = DRIVER_DATE,
	.major = DRIVER_MAJOR,
	.minor = DRIVER_MINOR,
};

static int kmb_remove(struct platform_device *pdev)
+5 −0
Original line number Diff line number Diff line
@@ -15,6 +15,11 @@
#define KMB_MAX_HEIGHT			1080 /*Max height in pixels */
#define KMB_MIN_WIDTH                   1920 /*Max width in pixels */
#define KMB_MIN_HEIGHT                  1080 /*Max height in pixels */

#define DRIVER_DATE			"20210223"
#define DRIVER_MAJOR			1
#define DRIVER_MINOR			1

#define KMB_LCD_DEFAULT_CLK		200000000
#define KMB_SYS_CLK_MHZ			500

+13 −2
Original line number Diff line number Diff line
@@ -427,8 +427,14 @@ static void kmb_plane_atomic_update(struct drm_plane *plane,

	kmb_set_bitmask_lcd(kmb, LCD_CONTROL, ctrl);

	/* FIXME no doc on how to set output format,these values are
	 * taken from the Myriadx tests
	/* Enable pipeline AXI read transactions for the DMA
	 * after setting graphics layers. This must be done
	 * in a separate write cycle.
	 */
	kmb_set_bitmask_lcd(kmb, LCD_CONTROL, LCD_CTRL_PIPELINE_DMA);

	/* FIXME no doc on how to set output format, these values are taken
	 * from the Myriadx tests
	 */
	out_format |= LCD_OUTF_FORMAT_RGB888;

@@ -526,6 +532,11 @@ struct kmb_plane *kmb_plane_init(struct drm_device *drm)
		plane->id = i;
	}

	/* Disable pipeline AXI read transactions for the DMA
	 * prior to setting graphics layers
	 */
	kmb_clr_bitmask_lcd(kmb, LCD_CONTROL, LCD_CTRL_PIPELINE_DMA);

	return primary;
cleanup:
	drmm_kfree(drm, plane);
+1 −1
Original line number Diff line number Diff line
@@ -492,7 +492,7 @@ struct vmw_private {
	resource_size_t vram_start;
	resource_size_t vram_size;
	resource_size_t prim_bb_mem;
	void __iomem *rmmio;
	u32 __iomem *rmmio;
	u32 *fifo_mem;
	resource_size_t fifo_mem_size;
	uint32_t fb_max_width;