mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 10:05:00 +08:00
52d2d44eee
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl0Gj1MeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGctkH/0At3+SQPY2JJSy8 i6+TDeytFx9OggeGLPHChRfehkAlvMb/kd34QHnuEvDqUuCAMU6HZQJFKoK9mvFI sDJVayPGDSqpm+iv8qLpMBPShiCXYVnGZeVfOdv36jUswL0k6wHV1pz4avFkDeZa 1F4pmI6O2XRkNTYQawbUaFkAngWUCBG9ECLnHJnuIY6ohShBvjI4+E2JUaht+8gO M2h2b9ieddWmjxV3LTKgsK1v+347RljxdZTWnJ62SCDSEVZvsgSA9W2wnebVhBkJ drSmrFLxNiM+W45mkbUFmQixRSmjv++oRR096fxAnodBxMw0TDxE1RiMQWE6rVvG N6MC6xA= =+B0P -----END PGP SIGNATURE----- Merge v5.2-rc5 into drm-next Maarten needs -rc4 backmerged so he can pull in the fbcon notifier removal topic branch into drm-misc-next. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
94 lines
2.8 KiB
C
94 lines
2.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright © 2006-2011 Intel Corporation
|
|
*
|
|
* Authors:
|
|
* Eric Anholt <eric@anholt.net>
|
|
* Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
|
|
*/
|
|
|
|
#ifndef _GMA_DISPLAY_H_
|
|
#define _GMA_DISPLAY_H_
|
|
|
|
#include <linux/pm_runtime.h>
|
|
|
|
struct drm_encoder;
|
|
struct drm_mode_set;
|
|
|
|
struct gma_clock_t {
|
|
/* given values */
|
|
int n;
|
|
int m1, m2;
|
|
int p1, p2;
|
|
/* derived values */
|
|
int dot;
|
|
int vco;
|
|
int m;
|
|
int p;
|
|
};
|
|
|
|
struct gma_range_t {
|
|
int min, max;
|
|
};
|
|
|
|
struct gma_p2_t {
|
|
int dot_limit;
|
|
int p2_slow, p2_fast;
|
|
};
|
|
|
|
struct gma_limit_t {
|
|
struct gma_range_t dot, vco, n, m, m1, m2, p, p1;
|
|
struct gma_p2_t p2;
|
|
bool (*find_pll)(const struct gma_limit_t *, struct drm_crtc *,
|
|
int target, int refclk,
|
|
struct gma_clock_t *best_clock);
|
|
};
|
|
|
|
struct gma_clock_funcs {
|
|
void (*clock)(int refclk, struct gma_clock_t *clock);
|
|
const struct gma_limit_t *(*limit)(struct drm_crtc *crtc, int refclk);
|
|
bool (*pll_is_valid)(struct drm_crtc *crtc,
|
|
const struct gma_limit_t *limit,
|
|
struct gma_clock_t *clock);
|
|
};
|
|
|
|
/* Common pipe related functions */
|
|
extern bool gma_pipe_has_type(struct drm_crtc *crtc, int type);
|
|
extern void gma_wait_for_vblank(struct drm_device *dev);
|
|
extern int gma_pipe_set_base(struct drm_crtc *crtc, int x, int y,
|
|
struct drm_framebuffer *old_fb);
|
|
extern int gma_crtc_cursor_set(struct drm_crtc *crtc,
|
|
struct drm_file *file_priv,
|
|
uint32_t handle,
|
|
uint32_t width, uint32_t height);
|
|
extern int gma_crtc_cursor_move(struct drm_crtc *crtc, int x, int y);
|
|
extern void gma_crtc_load_lut(struct drm_crtc *crtc);
|
|
extern int gma_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
|
u16 *blue, u32 size,
|
|
struct drm_modeset_acquire_ctx *ctx);
|
|
extern void gma_crtc_dpms(struct drm_crtc *crtc, int mode);
|
|
extern void gma_crtc_prepare(struct drm_crtc *crtc);
|
|
extern void gma_crtc_commit(struct drm_crtc *crtc);
|
|
extern void gma_crtc_disable(struct drm_crtc *crtc);
|
|
extern void gma_crtc_destroy(struct drm_crtc *crtc);
|
|
extern int gma_crtc_set_config(struct drm_mode_set *set,
|
|
struct drm_modeset_acquire_ctx *ctx);
|
|
|
|
extern void gma_crtc_save(struct drm_crtc *crtc);
|
|
extern void gma_crtc_restore(struct drm_crtc *crtc);
|
|
|
|
extern void gma_encoder_prepare(struct drm_encoder *encoder);
|
|
extern void gma_encoder_commit(struct drm_encoder *encoder);
|
|
extern void gma_encoder_destroy(struct drm_encoder *encoder);
|
|
|
|
/* Common clock related functions */
|
|
extern const struct gma_limit_t *gma_limit(struct drm_crtc *crtc, int refclk);
|
|
extern void gma_clock(int refclk, struct gma_clock_t *clock);
|
|
extern bool gma_pll_is_valid(struct drm_crtc *crtc,
|
|
const struct gma_limit_t *limit,
|
|
struct gma_clock_t *clock);
|
|
extern bool gma_find_best_pll(const struct gma_limit_t *limit,
|
|
struct drm_crtc *crtc, int target, int refclk,
|
|
struct gma_clock_t *best_clock);
|
|
#endif
|