#include <linux/delay.h>
#include <linux/iosys-map.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_format_helper.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_panic.h>
#include <drm/drm_print.h>
#include "mgag200_ddc.h"
#include "mgag200_drv.h"
void mgag200_crtc_set_gamma_linear(struct mga_device *mdev,
const struct drm_format_info *format)
{ … }
void mgag200_crtc_set_gamma(struct mga_device *mdev,
const struct drm_format_info *format,
struct drm_color_lut *lut)
{ … }
static inline void mga_wait_vsync(struct mga_device *mdev)
{ … }
static inline void mga_wait_busy(struct mga_device *mdev)
{ … }
static void mgag200_set_startadd(struct mga_device *mdev,
unsigned long offset)
{ … }
void mgag200_init_registers(struct mga_device *mdev)
{ … }
void mgag200_set_mode_regs(struct mga_device *mdev, const struct drm_display_mode *mode)
{ … }
static u8 mgag200_get_bpp_shift(const struct drm_format_info *format)
{ … }
static u32 mgag200_calculate_offset(struct mga_device *mdev,
const struct drm_framebuffer *fb)
{ … }
static void mgag200_set_offset(struct mga_device *mdev,
const struct drm_framebuffer *fb)
{ … }
void mgag200_set_format_regs(struct mga_device *mdev, const struct drm_format_info *format)
{ … }
void mgag200_enable_display(struct mga_device *mdev)
{ … }
static void mgag200_disable_display(struct mga_device *mdev)
{ … }
static void mgag200_handle_damage(struct mga_device *mdev, const struct iosys_map *vmap,
struct drm_framebuffer *fb, struct drm_rect *clip)
{ … }
const uint32_t mgag200_primary_plane_formats[] = …;
const size_t mgag200_primary_plane_formats_size = …;
const uint64_t mgag200_primary_plane_fmtmods[] = …;
int mgag200_primary_plane_helper_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *new_state)
{ … }
void mgag200_primary_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *old_state)
{ … }
void mgag200_primary_plane_helper_atomic_enable(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
void mgag200_primary_plane_helper_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *old_state)
{ … }
int mgag200_primary_plane_helper_get_scanout_buffer(struct drm_plane *plane,
struct drm_scanout_buffer *sb)
{ … }
enum drm_mode_status mgag200_crtc_helper_mode_valid(struct drm_crtc *crtc,
const struct drm_display_mode *mode)
{ … }
int mgag200_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *new_state)
{ … }
void mgag200_crtc_helper_atomic_flush(struct drm_crtc *crtc, struct drm_atomic_state *old_state)
{ … }
void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *old_state)
{ … }
void mgag200_crtc_helper_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *old_state)
{ … }
void mgag200_crtc_reset(struct drm_crtc *crtc)
{ … }
struct drm_crtc_state *mgag200_crtc_atomic_duplicate_state(struct drm_crtc *crtc)
{ … }
void mgag200_crtc_atomic_destroy_state(struct drm_crtc *crtc, struct drm_crtc_state *crtc_state)
{ … }
static void mgag200_mode_config_helper_atomic_commit_tail(struct drm_atomic_state *state)
{ … }
static const struct drm_mode_config_helper_funcs mgag200_mode_config_helper_funcs = …;
static uint32_t mgag200_calculate_mode_bandwidth(const struct drm_display_mode *mode,
unsigned int bits_per_pixel)
{ … }
static enum drm_mode_status mgag200_mode_config_mode_valid(struct drm_device *dev,
const struct drm_display_mode *mode)
{ … }
static const struct drm_mode_config_funcs mgag200_mode_config_funcs = …;
int mgag200_mode_config_init(struct mga_device *mdev, resource_size_t vram_available)
{ … }