[Intel-gfx] [RFC PATCH v3 2/4] drm/ipvr: drm driver for VED

Cheng, Yao yao.cheng at intel.com
Thu Nov 27 12:49:04 CET 2014


> -----Original Message-----
> From: Cheng, Yao
> Sent: Saturday, November 22, 2014 3:07
> To: intel-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org;
> daniel.vetter at ffwll.ch; Kelley, Sean V; Chehab, John
> Cc: Jiang, Fei; dh.herrmann at gmail.com; jani.nikula at linux.intel.com;
> emil.l.velikov at gmail.com; ville.syrjala at linux.intel.com;
> jbarnes at virtuousgeek.org; daniel at fooishbar.org; Cheng, Yao
> Subject: [RFC PATCH v3 2/4] drm/ipvr: drm driver for VED
> +typedef struct drm_ipvr_private {
> +	struct drm_device *dev;
> +	struct pci_dev *pci_root;
> +
> +	/* IMG video context */
> +	struct list_head ipvr_ctx_list;

The current design leads to ctx leak. There's no ctx_list for each file struct, so each create_context_ioctl causes one ctx leak.
Need to move the ctx_list from dev_private to file_private.

> +	spinlock_t ipvr_ctx_lock;
> +	struct idr ipvr_ctx_idr;
> +	struct ipvr_context default_ctx;
> +
> +	/* PM related */
> +	atomic_t pending_events;
> +
> +	/* exec related */
> +	struct ipvr_validate_context validate_ctx;
> +
> +	/* IMG MMU specific */
> +	struct ipvr_mmu_driver *mmu;
> +	/*struct ipvr_mmu_pd *pf_pd;*/
> +	atomic_t ipvr_mmu_invaldc;
> +
> +	/* GEM mm related */
> +	struct ipvr_gem_stat ipvr_stat;
> +	struct kmem_cache *ipvr_bo_slab;
> +	struct ipvr_address_space addr_space;
> +
> +	/* fence related */
> +	u32 last_seq;
> +	wait_queue_head_t fence_queue;
> +	struct ipvr_fence_driver fence_drv;
> +
> +	/* MMIO window shared from parent device */
> +	u8 __iomem* reg_base;
> +
> +	/*
> +	 * VED specific
> +	 */
> +	struct ved_private *ved_private;
> +}drm_ipvr_private_t;


More information about the Intel-gfx mailing list