cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

nouveau_display.h (2309B)


      1/* SPDX-License-Identifier: MIT */
      2#ifndef __NOUVEAU_DISPLAY_H__
      3#define __NOUVEAU_DISPLAY_H__
      4
      5#include "nouveau_drv.h"
      6
      7#include <nvif/disp.h>
      8
      9#include <drm/drm_framebuffer.h>
     10
     11int
     12nouveau_framebuffer_new(struct drm_device *dev,
     13			const struct drm_mode_fb_cmd2 *mode_cmd,
     14			struct drm_gem_object *gem,
     15			struct drm_framebuffer **pfb);
     16
     17struct nouveau_display {
     18	void *priv;
     19	void (*dtor)(struct drm_device *);
     20	int  (*init)(struct drm_device *, bool resume, bool runtime);
     21	void (*fini)(struct drm_device *, bool suspend, bool runtime);
     22
     23	struct nvif_disp disp;
     24
     25	struct drm_property *dithering_mode;
     26	struct drm_property *dithering_depth;
     27	struct drm_property *underscan_property;
     28	struct drm_property *underscan_hborder_property;
     29	struct drm_property *underscan_vborder_property;
     30	/* not really hue and saturation: */
     31	struct drm_property *vibrant_hue_property;
     32	struct drm_property *color_vibrance_property;
     33
     34	struct drm_atomic_state *suspend;
     35
     36	const u64 *format_modifiers;
     37};
     38
     39static inline struct nouveau_display *
     40nouveau_display(struct drm_device *dev)
     41{
     42	return nouveau_drm(dev)->display;
     43}
     44
     45int  nouveau_display_create(struct drm_device *dev);
     46void nouveau_display_destroy(struct drm_device *dev);
     47int  nouveau_display_init(struct drm_device *dev, bool resume, bool runtime);
     48void nouveau_display_hpd_resume(struct drm_device *dev);
     49void nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime);
     50int  nouveau_display_suspend(struct drm_device *dev, bool runtime);
     51void nouveau_display_resume(struct drm_device *dev, bool runtime);
     52int  nouveau_display_vblank_enable(struct drm_crtc *crtc);
     53void nouveau_display_vblank_disable(struct drm_crtc *crtc);
     54bool nouveau_display_scanoutpos(struct drm_crtc *crtc,
     55				bool in_vblank_irq, int *vpos, int *hpos,
     56				ktime_t *stime, ktime_t *etime,
     57				const struct drm_display_mode *mode);
     58
     59int  nouveau_display_dumb_create(struct drm_file *, struct drm_device *,
     60				 struct drm_mode_create_dumb *args);
     61
     62void nouveau_hdmi_mode_set(struct drm_encoder *, struct drm_display_mode *);
     63
     64void
     65nouveau_framebuffer_get_layout(struct drm_framebuffer *fb, uint32_t *tile_mode,
     66			       uint8_t *kind);
     67
     68struct drm_framebuffer *
     69nouveau_user_framebuffer_create(struct drm_device *, struct drm_file *,
     70				const struct drm_mode_fb_cmd2 *);
     71#endif