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

Cheng, Yao yao.cheng at intel.com
Sun Nov 30 19:09:09 PST 2014


Add Jon/Bob/Raf for detail review.
> -----Original Message-----
> From: dri-devel [mailto:dri-devel-bounces at lists.freedesktop.org] On Behalf
> Of Cheng, Yao
> Sent: Thursday, November 27, 2014 19:49
> To: intel-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org;
> daniel.vetter at ffwll.ch; Kelley, Sean V; Chehab, John
> Cc: emil.l.velikov at gmail.com; Jiang, Fei
> Subject: RE: [RFC PATCH v3 2/4] drm/ipvr: drm driver for VED
> 
> > -----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;
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the Intel-gfx mailing list