]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/bochs/bochs.h
drm/bochs: use simple display pipe
[linux.git] / drivers / gpu / drm / bochs / bochs.h
index fb38c8b857b5a26a7e40d2469d00fe3ce02546ed..36f6ee725d132385d85136ca419004810f21c607 100644 (file)
@@ -7,6 +7,7 @@
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_encoder.h>
 #include <drm/drm_fb_helper.h>
+#include <drm/drm_simple_kms_helper.h>
 
 #include <drm/drm_gem.h>
 
@@ -69,23 +70,15 @@ struct bochs_device {
        struct edid *edid;
 
        /* drm */
-       struct drm_device  *dev;
-       struct drm_crtc crtc;
-       struct drm_encoder encoder;
+       struct drm_device *dev;
+       struct drm_simple_display_pipe pipe;
        struct drm_connector connector;
-       bool mode_config_initialized;
 
        /* ttm */
        struct {
                struct ttm_bo_device bdev;
                bool initialized;
        } ttm;
-
-       /* fbdev */
-       struct {
-               struct drm_framebuffer *fb;
-               struct drm_fb_helper helper;
-       } fb;
 };
 
 struct bochs_bo {
@@ -121,8 +114,9 @@ int bochs_hw_init(struct drm_device *dev);
 void bochs_hw_fini(struct drm_device *dev);
 
 void bochs_hw_setmode(struct bochs_device *bochs,
-                     struct drm_display_mode *mode,
-                     const struct drm_format_info *format);
+                     struct drm_display_mode *mode);
+void bochs_hw_setformat(struct bochs_device *bochs,
+                       const struct drm_format_info *format);
 void bochs_hw_setbase(struct bochs_device *bochs,
                      int x, int y, u64 addr);
 int bochs_hw_load_edid(struct bochs_device *bochs);
@@ -141,15 +135,19 @@ int bochs_dumb_create(struct drm_file *file, struct drm_device *dev,
 int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev,
                           uint32_t handle, uint64_t *offset);
 
-int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr);
+int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag);
 int bochs_bo_unpin(struct bochs_bo *bo);
 
+int bochs_gem_prime_pin(struct drm_gem_object *obj);
+void bochs_gem_prime_unpin(struct drm_gem_object *obj);
+void *bochs_gem_prime_vmap(struct drm_gem_object *obj);
+void bochs_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
+int bochs_gem_prime_mmap(struct drm_gem_object *obj,
+                        struct vm_area_struct *vma);
+
 /* bochs_kms.c */
 int bochs_kms_init(struct bochs_device *bochs);
 void bochs_kms_fini(struct bochs_device *bochs);
 
 /* bochs_fbdev.c */
-int bochs_fbdev_init(struct bochs_device *bochs);
-void bochs_fbdev_fini(struct bochs_device *bochs);
-
 extern const struct drm_mode_config_funcs bochs_mode_funcs;