Lines Matching refs:rsrc
233 unsigned int rsrc) in __vga_tryget() argument
244 if ((rsrc & VGA_RSRC_NORMAL_IO) && in __vga_tryget()
246 rsrc |= VGA_RSRC_LEGACY_IO; in __vga_tryget()
247 if ((rsrc & VGA_RSRC_NORMAL_MEM) && in __vga_tryget()
249 rsrc |= VGA_RSRC_LEGACY_MEM; in __vga_tryget()
251 vgaarb_dbg(dev, "%s: %d\n", __func__, rsrc); in __vga_tryget()
255 wants = rsrc & ~vgadev->owns; in __vga_tryget()
358 vgadev->locks |= (rsrc & VGA_RSRC_LEGACY_MASK); in __vga_tryget()
359 if (rsrc & VGA_RSRC_LEGACY_IO) in __vga_tryget()
361 if (rsrc & VGA_RSRC_LEGACY_MEM) in __vga_tryget()
363 if (rsrc & VGA_RSRC_NORMAL_IO) in __vga_tryget()
365 if (rsrc & VGA_RSRC_NORMAL_MEM) in __vga_tryget()
371 static void __vga_put(struct vga_device *vgadev, unsigned int rsrc) in __vga_put() argument
381 if ((rsrc & VGA_RSRC_NORMAL_IO) && vgadev->io_norm_cnt > 0) { in __vga_put()
384 rsrc |= VGA_RSRC_LEGACY_IO; in __vga_put()
386 if ((rsrc & VGA_RSRC_NORMAL_MEM) && vgadev->mem_norm_cnt > 0) { in __vga_put()
389 rsrc |= VGA_RSRC_LEGACY_MEM; in __vga_put()
391 if ((rsrc & VGA_RSRC_LEGACY_IO) && vgadev->io_lock_cnt > 0) in __vga_put()
393 if ((rsrc & VGA_RSRC_LEGACY_MEM) && vgadev->mem_lock_cnt > 0) in __vga_put()
445 int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) in vga_get() argument
467 conflict = __vga_tryget(vgadev, rsrc); in vga_get()
512 static int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) in vga_tryget() argument
531 if (__vga_tryget(vgadev, rsrc)) in vga_tryget()
548 void vga_put(struct pci_dev *pdev, unsigned int rsrc) in vga_put() argument
562 __vga_put(vgadev, rsrc); in vga_put()