omap_drv.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
  4. * Author: Rob Clark <rob@ti.com>
  5. */
  6. #ifndef __OMAPDRM_DRV_H__
  7. #define __OMAPDRM_DRV_H__
  8. #include <linux/module.h>
  9. #include <linux/types.h>
  10. #include <linux/workqueue.h>
  11. #include "dss/omapdss.h"
  12. #include <drm/drm_gem.h>
  13. #include <drm/omap_drm.h>
  14. #include "omap_connector.h"
  15. #include "omap_crtc.h"
  16. #include "omap_encoder.h"
  17. #include "omap_fb.h"
  18. #include "omap_fbdev.h"
  19. #include "omap_gem.h"
  20. #include "omap_irq.h"
  21. #include "omap_plane.h"
  22. #define DBG(fmt, ...) DRM_DEBUG_DRIVER(fmt"\n", ##__VA_ARGS__)
  23. #define VERB(fmt, ...) if (0) DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__) /* verbose debug */
  24. #define MODULE_NAME "omapdrm"
  25. struct omap_drm_usergart;
  26. struct omap_drm_pipeline {
  27. struct drm_crtc *crtc;
  28. struct drm_encoder *encoder;
  29. struct drm_connector *connector;
  30. struct omap_dss_device *output;
  31. unsigned int alias_id;
  32. };
  33. struct omap_drm_private {
  34. struct drm_device *ddev;
  35. struct device *dev;
  36. u32 omaprev;
  37. struct dss_device *dss;
  38. struct dispc_device *dispc;
  39. const struct dispc_ops *dispc_ops;
  40. unsigned int num_pipes;
  41. struct omap_drm_pipeline pipes[8];
  42. struct omap_drm_pipeline *channels[8];
  43. unsigned int num_planes;
  44. struct drm_plane *planes[8];
  45. struct drm_fb_helper *fbdev;
  46. struct workqueue_struct *wq;
  47. /* lock for obj_list below */
  48. struct mutex list_lock;
  49. /* list of GEM objects: */
  50. struct list_head obj_list;
  51. struct omap_drm_usergart *usergart;
  52. bool has_dmm;
  53. /* properties: */
  54. struct drm_property *zorder_prop;
  55. /* irq handling: */
  56. spinlock_t wait_lock; /* protects the wait_list */
  57. struct list_head wait_list; /* list of omap_irq_wait */
  58. u32 irq_mask; /* enabled irqs in addition to wait_list */
  59. /* memory bandwidth limit if it is needed on the platform */
  60. unsigned int max_bandwidth;
  61. };
  62. void omap_debugfs_init(struct drm_minor *minor);
  63. #endif /* __OMAPDRM_DRV_H__ */