#include <linux/bitfield.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_damage_helper.h>
#include <drm/drm_drv.h>
#include <drm/drm_edid.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_vblank.h>
#include "udl_drv.h"
#include "udl_edid.h"
#include "udl_proto.h"
static char *udl_set_register(char *buf, u8 reg, u8 val)
{ … }
static char *udl_vidreg_lock(char *buf)
{ … }
static char *udl_vidreg_unlock(char *buf)
{ … }
static char *udl_set_blank_mode(char *buf, u8 mode)
{ … }
static char *udl_set_color_depth(char *buf, u8 selection)
{ … }
static char *udl_set_base16bpp(char *buf, u32 base)
{ … }
static char *udl_set_base8bpp(char *buf, u32 base)
{ … }
static char *udl_set_register_16(char *wrptr, u8 reg, u16 value)
{ … }
static char *udl_set_register_16be(char *wrptr, u8 reg, u16 value)
{ … }
static u16 udl_lfsr16(u16 actual_count)
{ … }
static char *udl_set_register_lfsr16(char *wrptr, u8 reg, u16 value)
{ … }
static char *udl_set_display_mode(char *buf, struct drm_display_mode *mode)
{ … }
static char *udl_dummy_render(char *wrptr)
{ … }
static long udl_log_cpp(unsigned int cpp)
{ … }
static int udl_handle_damage(struct drm_framebuffer *fb,
const struct iosys_map *map,
const struct drm_rect *clip)
{ … }
static const uint32_t udl_primary_plane_formats[] = …;
static const uint64_t udl_primary_plane_fmtmods[] = …;
static int udl_primary_plane_helper_atomic_check(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static void udl_primary_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{ … }
static const struct drm_plane_helper_funcs udl_primary_plane_helper_funcs = …;
static const struct drm_plane_funcs udl_primary_plane_funcs = …;
static void udl_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *state)
{ … }
static void udl_crtc_helper_atomic_disable(struct drm_crtc *crtc, struct drm_atomic_state *state)
{ … }
static const struct drm_crtc_helper_funcs udl_crtc_helper_funcs = …;
static const struct drm_crtc_funcs udl_crtc_funcs = …;
static const struct drm_encoder_funcs udl_encoder_funcs = …;
static int udl_connector_helper_get_modes(struct drm_connector *connector)
{ … }
static int udl_connector_helper_detect_ctx(struct drm_connector *connector,
struct drm_modeset_acquire_ctx *ctx,
bool force)
{ … }
static const struct drm_connector_helper_funcs udl_connector_helper_funcs = …;
static const struct drm_connector_funcs udl_connector_funcs = …;
static enum drm_mode_status udl_mode_config_mode_valid(struct drm_device *dev,
const struct drm_display_mode *mode)
{ … }
static const struct drm_mode_config_funcs udl_mode_config_funcs = …;
int udl_modeset_init(struct drm_device *dev)
{ … }