drm_fops.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. /**
  2. * \file drm_fops.c
  3. * File operations for DRM
  4. *
  5. * \author Rickard E. (Rik) Faith <faith@valinux.com>
  6. * \author Daryll Strauss <daryll@valinux.com>
  7. * \author Gareth Hughes <gareth@valinux.com>
  8. */
  9. /*
  10. * Created: Mon Jan 4 08:58:31 1999 by faith@valinux.com
  11. *
  12. * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
  13. * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  14. * All Rights Reserved.
  15. *
  16. * Permission is hereby granted, free of charge, to any person obtaining a
  17. * copy of this software and associated documentation files (the "Software"),
  18. * to deal in the Software without restriction, including without limitation
  19. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  20. * and/or sell copies of the Software, and to permit persons to whom the
  21. * Software is furnished to do so, subject to the following conditions:
  22. *
  23. * The above copyright notice and this permission notice (including the next
  24. * paragraph) shall be included in all copies or substantial portions of the
  25. * Software.
  26. *
  27. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  28. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  29. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  30. * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  31. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  32. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  33. * OTHER DEALINGS IN THE SOFTWARE.
  34. */
  35. #include "drmP.h"
  36. #include <linux/poll.h>
  37. #include <linux/slab.h>
  38. #include <linux/smp_lock.h>
  39. static int drm_open_helper(struct inode *inode, struct file *filp,
  40. struct drm_device * dev);
  41. static int drm_setup(struct drm_device * dev)
  42. {
  43. int i;
  44. int ret;
  45. if (dev->driver->firstopen) {
  46. ret = dev->driver->firstopen(dev);
  47. if (ret != 0)
  48. return ret;
  49. }
  50. atomic_set(&dev->ioctl_count, 0);
  51. atomic_set(&dev->vma_count, 0);
  52. if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) &&
  53. !drm_core_check_feature(dev, DRIVER_MODESET)) {
  54. dev->buf_use = 0;
  55. atomic_set(&dev->buf_alloc, 0);
  56. i = drm_dma_setup(dev);
  57. if (i < 0)
  58. return i;
  59. }
  60. for (i = 0; i < ARRAY_SIZE(dev->counts); i++)
  61. atomic_set(&dev->counts[i], 0);
  62. dev->sigdata.lock = NULL;
  63. dev->queue_count = 0;
  64. dev->queue_reserved = 0;
  65. dev->queue_slots = 0;
  66. dev->queuelist = NULL;
  67. dev->context_flag = 0;
  68. dev->interrupt_flag = 0;
  69. dev->dma_flag = 0;
  70. dev->last_context = 0;
  71. dev->last_switch = 0;
  72. dev->last_checked = 0;
  73. init_waitqueue_head(&dev->context_wait);
  74. dev->if_version = 0;
  75. dev->ctx_start = 0;
  76. dev->lck_start = 0;
  77. dev->buf_async = NULL;
  78. init_waitqueue_head(&dev->buf_readers);
  79. init_waitqueue_head(&dev->buf_writers);
  80. DRM_DEBUG("\n");
  81. /*
  82. * The kernel's context could be created here, but is now created
  83. * in drm_dma_enqueue. This is more resource-efficient for
  84. * hardware that does not do DMA, but may mean that
  85. * drm_select_queue fails between the time the interrupt is
  86. * initialized and the time the queues are initialized.
  87. */
  88. return 0;
  89. }
  90. /**
  91. * Open file.
  92. *
  93. * \param inode device inode
  94. * \param filp file pointer.
  95. * \return zero on success or a negative number on failure.
  96. *
  97. * Searches the DRM device with the same minor number, calls open_helper(), and
  98. * increments the device open count. If the open count was previous at zero,
  99. * i.e., it's the first that the device is open, then calls setup().
  100. */
  101. int drm_open(struct inode *inode, struct file *filp)
  102. {
  103. struct drm_device *dev = NULL;
  104. int minor_id = iminor(inode);
  105. struct drm_minor *minor;
  106. int retcode = 0;
  107. minor = idr_find(&drm_minors_idr, minor_id);
  108. if (!minor)
  109. return -ENODEV;
  110. if (!(dev = minor->dev))
  111. return -ENODEV;
  112. retcode = drm_open_helper(inode, filp, dev);
  113. if (!retcode) {
  114. atomic_inc(&dev->counts[_DRM_STAT_OPENS]);
  115. spin_lock(&dev->count_lock);
  116. if (!dev->open_count++) {
  117. spin_unlock(&dev->count_lock);
  118. retcode = drm_setup(dev);
  119. goto out;
  120. }
  121. spin_unlock(&dev->count_lock);
  122. }
  123. out:
  124. if (!retcode) {
  125. mutex_lock(&dev->struct_mutex);
  126. if (minor->type == DRM_MINOR_LEGACY) {
  127. if (dev->dev_mapping == NULL)
  128. dev->dev_mapping = inode->i_mapping;
  129. else if (dev->dev_mapping != inode->i_mapping)
  130. retcode = -ENODEV;
  131. }
  132. mutex_unlock(&dev->struct_mutex);
  133. }
  134. return retcode;
  135. }
  136. EXPORT_SYMBOL(drm_open);
  137. /**
  138. * File \c open operation.
  139. *
  140. * \param inode device inode.
  141. * \param filp file pointer.
  142. *
  143. * Puts the dev->fops corresponding to the device minor number into
  144. * \p filp, call the \c open method, and restore the file operations.
  145. */
  146. int drm_stub_open(struct inode *inode, struct file *filp)
  147. {
  148. struct drm_device *dev = NULL;
  149. struct drm_minor *minor;
  150. int minor_id = iminor(inode);
  151. int err = -ENODEV;
  152. const struct file_operations *old_fops;
  153. DRM_DEBUG("\n");
  154. /* BKL pushdown: note that nothing else serializes idr_find() */
  155. lock_kernel();
  156. minor = idr_find(&drm_minors_idr, minor_id);
  157. if (!minor)
  158. goto out;
  159. if (!(dev = minor->dev))
  160. goto out;
  161. old_fops = filp->f_op;
  162. filp->f_op = fops_get(&dev->driver->fops);
  163. if (filp->f_op == NULL) {
  164. filp->f_op = old_fops;
  165. goto out;
  166. }
  167. if (filp->f_op->open && (err = filp->f_op->open(inode, filp))) {
  168. fops_put(filp->f_op);
  169. filp->f_op = fops_get(old_fops);
  170. }
  171. fops_put(old_fops);
  172. out:
  173. unlock_kernel();
  174. return err;
  175. }
  176. /**
  177. * Check whether DRI will run on this CPU.
  178. *
  179. * \return non-zero if the DRI will run on this CPU, or zero otherwise.
  180. */
  181. static int drm_cpu_valid(void)
  182. {
  183. #if defined(__i386__)
  184. if (boot_cpu_data.x86 == 3)
  185. return 0; /* No cmpxchg on a 386 */
  186. #endif
  187. #if defined(__sparc__) && !defined(__sparc_v9__)
  188. return 0; /* No cmpxchg before v9 sparc. */
  189. #endif
  190. return 1;
  191. }
  192. /**
  193. * Called whenever a process opens /dev/drm.
  194. *
  195. * \param inode device inode.
  196. * \param filp file pointer.
  197. * \param dev device.
  198. * \return zero on success or a negative number on failure.
  199. *
  200. * Creates and initializes a drm_file structure for the file private data in \p
  201. * filp and add it into the double linked list in \p dev.
  202. */
  203. static int drm_open_helper(struct inode *inode, struct file *filp,
  204. struct drm_device * dev)
  205. {
  206. int minor_id = iminor(inode);
  207. struct drm_file *priv;
  208. int ret;
  209. if (filp->f_flags & O_EXCL)
  210. return -EBUSY; /* No exclusive opens */
  211. if (!drm_cpu_valid())
  212. return -EINVAL;
  213. DRM_DEBUG("pid = %d, minor = %d\n", task_pid_nr(current), minor_id);
  214. priv = kmalloc(sizeof(*priv), GFP_KERNEL);
  215. if (!priv)
  216. return -ENOMEM;
  217. memset(priv, 0, sizeof(*priv));
  218. filp->private_data = priv;
  219. priv->filp = filp;
  220. priv->uid = current_euid();
  221. priv->pid = task_pid_nr(current);
  222. priv->minor = idr_find(&drm_minors_idr, minor_id);
  223. priv->ioctl_count = 0;
  224. /* for compatibility root is always authenticated */
  225. priv->authenticated = capable(CAP_SYS_ADMIN);
  226. priv->lock_count = 0;
  227. INIT_LIST_HEAD(&priv->lhead);
  228. INIT_LIST_HEAD(&priv->fbs);
  229. INIT_LIST_HEAD(&priv->event_list);
  230. init_waitqueue_head(&priv->event_wait);
  231. priv->event_space = 4096; /* set aside 4k for event buffer */
  232. if (dev->driver->driver_features & DRIVER_GEM)
  233. drm_gem_open(dev, priv);
  234. if (dev->driver->open) {
  235. ret = dev->driver->open(dev, priv);
  236. if (ret < 0)
  237. goto out_free;
  238. }
  239. /* if there is no current master make this fd it */
  240. mutex_lock(&dev->struct_mutex);
  241. if (!priv->minor->master) {
  242. /* create a new master */
  243. priv->minor->master = drm_master_create(priv->minor);
  244. if (!priv->minor->master) {
  245. mutex_unlock(&dev->struct_mutex);
  246. ret = -ENOMEM;
  247. goto out_free;
  248. }
  249. priv->is_master = 1;
  250. /* take another reference for the copy in the local file priv */
  251. priv->master = drm_master_get(priv->minor->master);
  252. priv->authenticated = 1;
  253. mutex_unlock(&dev->struct_mutex);
  254. if (dev->driver->master_create) {
  255. ret = dev->driver->master_create(dev, priv->master);
  256. if (ret) {
  257. mutex_lock(&dev->struct_mutex);
  258. /* drop both references if this fails */
  259. drm_master_put(&priv->minor->master);
  260. drm_master_put(&priv->master);
  261. mutex_unlock(&dev->struct_mutex);
  262. goto out_free;
  263. }
  264. }
  265. mutex_lock(&dev->struct_mutex);
  266. if (dev->driver->master_set) {
  267. ret = dev->driver->master_set(dev, priv, true);
  268. if (ret) {
  269. /* drop both references if this fails */
  270. drm_master_put(&priv->minor->master);
  271. drm_master_put(&priv->master);
  272. mutex_unlock(&dev->struct_mutex);
  273. goto out_free;
  274. }
  275. }
  276. mutex_unlock(&dev->struct_mutex);
  277. } else {
  278. /* get a reference to the master */
  279. priv->master = drm_master_get(priv->minor->master);
  280. mutex_unlock(&dev->struct_mutex);
  281. }
  282. mutex_lock(&dev->struct_mutex);
  283. list_add(&priv->lhead, &dev->filelist);
  284. mutex_unlock(&dev->struct_mutex);
  285. #ifdef __alpha__
  286. /*
  287. * Default the hose
  288. */
  289. if (!dev->hose) {
  290. struct pci_dev *pci_dev;
  291. pci_dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, NULL);
  292. if (pci_dev) {
  293. dev->hose = pci_dev->sysdata;
  294. pci_dev_put(pci_dev);
  295. }
  296. if (!dev->hose) {
  297. struct pci_bus *b = pci_bus_b(pci_root_buses.next);
  298. if (b)
  299. dev->hose = b->sysdata;
  300. }
  301. }
  302. #endif
  303. return 0;
  304. out_free:
  305. kfree(priv);
  306. filp->private_data = NULL;
  307. return ret;
  308. }
  309. /** No-op. */
  310. int drm_fasync(int fd, struct file *filp, int on)
  311. {
  312. struct drm_file *priv = filp->private_data;
  313. struct drm_device *dev = priv->minor->dev;
  314. DRM_DEBUG("fd = %d, device = 0x%lx\n", fd,
  315. (long)old_encode_dev(priv->minor->device));
  316. return fasync_helper(fd, filp, on, &dev->buf_async);
  317. }
  318. EXPORT_SYMBOL(drm_fasync);
  319. /*
  320. * Reclaim locked buffers; note that this may be a bad idea if the current
  321. * context doesn't have the hw lock...
  322. */
  323. static void drm_reclaim_locked_buffers(struct drm_device *dev, struct file *f)
  324. {
  325. struct drm_file *file_priv = f->private_data;
  326. if (drm_i_have_hw_lock(dev, file_priv)) {
  327. dev->driver->reclaim_buffers_locked(dev, file_priv);
  328. } else {
  329. unsigned long _end = jiffies + 3 * DRM_HZ;
  330. int locked = 0;
  331. drm_idlelock_take(&file_priv->master->lock);
  332. /*
  333. * Wait for a while.
  334. */
  335. do {
  336. spin_lock_bh(&file_priv->master->lock.spinlock);
  337. locked = file_priv->master->lock.idle_has_lock;
  338. spin_unlock_bh(&file_priv->master->lock.spinlock);
  339. if (locked)
  340. break;
  341. schedule();
  342. } while (!time_after_eq(jiffies, _end));
  343. if (!locked) {
  344. DRM_ERROR("reclaim_buffers_locked() deadlock. Please rework this\n"
  345. "\tdriver to use reclaim_buffers_idlelocked() instead.\n"
  346. "\tI will go on reclaiming the buffers anyway.\n");
  347. }
  348. dev->driver->reclaim_buffers_locked(dev, file_priv);
  349. drm_idlelock_release(&file_priv->master->lock);
  350. }
  351. }
  352. static void drm_master_release(struct drm_device *dev, struct file *filp)
  353. {
  354. struct drm_file *file_priv = filp->private_data;
  355. if (dev->driver->reclaim_buffers_locked &&
  356. file_priv->master->lock.hw_lock)
  357. drm_reclaim_locked_buffers(dev, filp);
  358. if (dev->driver->reclaim_buffers_idlelocked &&
  359. file_priv->master->lock.hw_lock) {
  360. drm_idlelock_take(&file_priv->master->lock);
  361. dev->driver->reclaim_buffers_idlelocked(dev, file_priv);
  362. drm_idlelock_release(&file_priv->master->lock);
  363. }
  364. if (drm_i_have_hw_lock(dev, file_priv)) {
  365. DRM_DEBUG("File %p released, freeing lock for context %d\n",
  366. filp, _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock));
  367. drm_lock_free(&file_priv->master->lock,
  368. _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock));
  369. }
  370. if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) &&
  371. !dev->driver->reclaim_buffers_locked) {
  372. dev->driver->reclaim_buffers(dev, file_priv);
  373. }
  374. }
  375. static void drm_events_release(struct drm_file *file_priv)
  376. {
  377. struct drm_device *dev = file_priv->minor->dev;
  378. struct drm_pending_event *e, *et;
  379. struct drm_pending_vblank_event *v, *vt;
  380. unsigned long flags;
  381. spin_lock_irqsave(&dev->event_lock, flags);
  382. /* Remove pending flips */
  383. list_for_each_entry_safe(v, vt, &dev->vblank_event_list, base.link)
  384. if (v->base.file_priv == file_priv) {
  385. list_del(&v->base.link);
  386. drm_vblank_put(dev, v->pipe);
  387. v->base.destroy(&v->base);
  388. }
  389. /* Remove unconsumed events */
  390. list_for_each_entry_safe(e, et, &file_priv->event_list, link)
  391. e->destroy(e);
  392. spin_unlock_irqrestore(&dev->event_lock, flags);
  393. }
  394. /**
  395. * Release file.
  396. *
  397. * \param inode device inode
  398. * \param file_priv DRM file private.
  399. * \return zero on success or a negative number on failure.
  400. *
  401. * If the hardware lock is held then free it, and take it again for the kernel
  402. * context since it's necessary to reclaim buffers. Unlink the file private
  403. * data from its list and free it. Decreases the open count and if it reaches
  404. * zero calls drm_lastclose().
  405. */
  406. int drm_release(struct inode *inode, struct file *filp)
  407. {
  408. struct drm_file *file_priv = filp->private_data;
  409. struct drm_device *dev = file_priv->minor->dev;
  410. int retcode = 0;
  411. lock_kernel();
  412. DRM_DEBUG("open_count = %d\n", dev->open_count);
  413. if (dev->driver->preclose)
  414. dev->driver->preclose(dev, file_priv);
  415. /* ========================================================
  416. * Begin inline drm_release
  417. */
  418. DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
  419. task_pid_nr(current),
  420. (long)old_encode_dev(file_priv->minor->device),
  421. dev->open_count);
  422. /* if the master has gone away we can't do anything with the lock */
  423. if (file_priv->minor->master)
  424. drm_master_release(dev, filp);
  425. drm_events_release(file_priv);
  426. if (dev->driver->driver_features & DRIVER_GEM)
  427. drm_gem_release(dev, file_priv);
  428. if (dev->driver->driver_features & DRIVER_MODESET)
  429. drm_fb_release(file_priv);
  430. mutex_lock(&dev->ctxlist_mutex);
  431. if (!list_empty(&dev->ctxlist)) {
  432. struct drm_ctx_list *pos, *n;
  433. list_for_each_entry_safe(pos, n, &dev->ctxlist, head) {
  434. if (pos->tag == file_priv &&
  435. pos->handle != DRM_KERNEL_CONTEXT) {
  436. if (dev->driver->context_dtor)
  437. dev->driver->context_dtor(dev,
  438. pos->handle);
  439. drm_ctxbitmap_free(dev, pos->handle);
  440. list_del(&pos->head);
  441. kfree(pos);
  442. --dev->ctx_count;
  443. }
  444. }
  445. }
  446. mutex_unlock(&dev->ctxlist_mutex);
  447. mutex_lock(&dev->struct_mutex);
  448. if (file_priv->is_master) {
  449. struct drm_master *master = file_priv->master;
  450. struct drm_file *temp;
  451. list_for_each_entry(temp, &dev->filelist, lhead) {
  452. if ((temp->master == file_priv->master) &&
  453. (temp != file_priv))
  454. temp->authenticated = 0;
  455. }
  456. /**
  457. * Since the master is disappearing, so is the
  458. * possibility to lock.
  459. */
  460. if (master->lock.hw_lock) {
  461. if (dev->sigdata.lock == master->lock.hw_lock)
  462. dev->sigdata.lock = NULL;
  463. master->lock.hw_lock = NULL;
  464. master->lock.file_priv = NULL;
  465. wake_up_interruptible_all(&master->lock.lock_queue);
  466. }
  467. if (file_priv->minor->master == file_priv->master) {
  468. /* drop the reference held my the minor */
  469. if (dev->driver->master_drop)
  470. dev->driver->master_drop(dev, file_priv, true);
  471. drm_master_put(&file_priv->minor->master);
  472. }
  473. }
  474. /* drop the reference held my the file priv */
  475. drm_master_put(&file_priv->master);
  476. file_priv->is_master = 0;
  477. list_del(&file_priv->lhead);
  478. mutex_unlock(&dev->struct_mutex);
  479. if (dev->driver->postclose)
  480. dev->driver->postclose(dev, file_priv);
  481. kfree(file_priv);
  482. /* ========================================================
  483. * End inline drm_release
  484. */
  485. atomic_inc(&dev->counts[_DRM_STAT_CLOSES]);
  486. spin_lock(&dev->count_lock);
  487. if (!--dev->open_count) {
  488. if (atomic_read(&dev->ioctl_count)) {
  489. DRM_ERROR("Device busy: %d\n",
  490. atomic_read(&dev->ioctl_count));
  491. spin_unlock(&dev->count_lock);
  492. unlock_kernel();
  493. return -EBUSY;
  494. }
  495. spin_unlock(&dev->count_lock);
  496. unlock_kernel();
  497. return drm_lastclose(dev);
  498. }
  499. spin_unlock(&dev->count_lock);
  500. unlock_kernel();
  501. return retcode;
  502. }
  503. EXPORT_SYMBOL(drm_release);
  504. static bool
  505. drm_dequeue_event(struct drm_file *file_priv,
  506. size_t total, size_t max, struct drm_pending_event **out)
  507. {
  508. struct drm_device *dev = file_priv->minor->dev;
  509. struct drm_pending_event *e;
  510. unsigned long flags;
  511. bool ret = false;
  512. spin_lock_irqsave(&dev->event_lock, flags);
  513. *out = NULL;
  514. if (list_empty(&file_priv->event_list))
  515. goto out;
  516. e = list_first_entry(&file_priv->event_list,
  517. struct drm_pending_event, link);
  518. if (e->event->length + total > max)
  519. goto out;
  520. file_priv->event_space += e->event->length;
  521. list_del(&e->link);
  522. *out = e;
  523. ret = true;
  524. out:
  525. spin_unlock_irqrestore(&dev->event_lock, flags);
  526. return ret;
  527. }
  528. ssize_t drm_read(struct file *filp, char __user *buffer,
  529. size_t count, loff_t *offset)
  530. {
  531. struct drm_file *file_priv = filp->private_data;
  532. struct drm_pending_event *e;
  533. size_t total;
  534. ssize_t ret;
  535. ret = wait_event_interruptible(file_priv->event_wait,
  536. !list_empty(&file_priv->event_list));
  537. if (ret < 0)
  538. return ret;
  539. total = 0;
  540. while (drm_dequeue_event(file_priv, total, count, &e)) {
  541. if (copy_to_user(buffer + total,
  542. e->event, e->event->length)) {
  543. total = -EFAULT;
  544. break;
  545. }
  546. total += e->event->length;
  547. e->destroy(e);
  548. }
  549. return total;
  550. }
  551. EXPORT_SYMBOL(drm_read);
  552. unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait)
  553. {
  554. struct drm_file *file_priv = filp->private_data;
  555. unsigned int mask = 0;
  556. poll_wait(filp, &file_priv->event_wait, wait);
  557. if (!list_empty(&file_priv->event_list))
  558. mask |= POLLIN | POLLRDNORM;
  559. return mask;
  560. }
  561. EXPORT_SYMBOL(drm_poll);