#include <linux/console.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/sysrq.h>
#include <linux/tty.h>
#include <linux/vga_switcheroo.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include "gem/i915_gem_mman.h"
#include "gem/i915_gem_object.h"
#include "i915_drv.h"
#include "intel_display_types.h"
#include "intel_fb.h"
#include "intel_fb_pin.h"
#include "intel_fbdev.h"
#include "intel_fbdev_fb.h"
#include "intel_frontbuffer.h"
struct intel_fbdev { … };
static struct intel_fbdev *to_intel_fbdev(struct drm_fb_helper *fb_helper)
{ … }
static struct intel_frontbuffer *to_frontbuffer(struct intel_fbdev *ifbdev)
{ … }
static void intel_fbdev_invalidate(struct intel_fbdev *ifbdev)
{ … }
FB_GEN_DEFAULT_DEFERRED_IOMEM_OPS(intel_fbdev,
drm_fb_helper_damage_range,
drm_fb_helper_damage_area)
static int intel_fbdev_set_par(struct fb_info *info)
{ … }
static int intel_fbdev_blank(int blank, struct fb_info *info)
{ … }
static int intel_fbdev_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{ … }
static int intel_fbdev_mmap(struct fb_info *info, struct vm_area_struct *vma)
{ … }
static void intel_fbdev_fb_destroy(struct fb_info *info)
{ … }
__diag_push();
__diag_ignore_all("-Woverride-init", "Allow field initialization overrides for fb ops");
static const struct fb_ops intelfb_ops = …;
__diag_pop();
static int intelfb_create(struct drm_fb_helper *helper,
struct drm_fb_helper_surface_size *sizes)
{ … }
static int intelfb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect *clip)
{ … }
static const struct drm_fb_helper_funcs intel_fb_helper_funcs = …;
static bool intel_fbdev_init_bios(struct drm_device *dev,
struct intel_fbdev *ifbdev)
{ … }
static void intel_fbdev_suspend_worker(struct work_struct *work)
{ … }
static void intel_fbdev_hpd_set_suspend(struct drm_i915_private *i915, int state)
{ … }
void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous)
{ … }
static int intel_fbdev_output_poll_changed(struct drm_device *dev)
{ … }
static int intel_fbdev_restore_mode(struct drm_i915_private *dev_priv)
{ … }
static void intel_fbdev_client_unregister(struct drm_client_dev *client)
{ … }
static int intel_fbdev_client_restore(struct drm_client_dev *client)
{ … }
static int intel_fbdev_client_hotplug(struct drm_client_dev *client)
{ … }
static const struct drm_client_funcs intel_fbdev_client_funcs = …;
void intel_fbdev_setup(struct drm_i915_private *i915)
{ … }
struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev)
{ … }