linux/drivers/gpu/drm/nouveau/nouveau_bios.c

/*
 * Copyright 2005-2006 Erik Waling
 * Copyright 2006 Stephane Marchesin
 * Copyright 2007-2009 Stuart Bennett
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#include "nouveau_drv.h"
#include "nouveau_bios.h"
#include "nouveau_reg.h"
#include "dispnv04/hw.h"
#include "nouveau_encoder.h"

#include <subdev/gsp.h>

#include <linux/io-mapping.h>
#include <linux/firmware.h>

/* these defines are made up */
#define NV_CIO_CRE_44_HEADA
#define NV_CIO_CRE_44_HEADB
#define FEATURE_MOBILE

#define EDID1_LEN

#define BIOSLOG(sip, fmt, arg...)
#define LOG_OLD_VALUE(x)

static bool nv_cksum(const uint8_t *data, unsigned int length)
{}

static uint16_t clkcmptable(struct nvbios *bios, uint16_t clktable, int pxclk)
{}

static void
run_digital_op_script(struct drm_device *dev, uint16_t scriptptr,
		      struct dcb_output *dcbent, int head, bool dl)
{}

static int call_lvds_manufacturer_script(struct drm_device *dev, struct dcb_output *dcbent, int head, enum LVDS_script script)
{}

static int run_lvds_table(struct drm_device *dev, struct dcb_output *dcbent, int head, enum LVDS_script script, int pxclk)
{}

int call_lvds_script(struct drm_device *dev, struct dcb_output *dcbent, int head, enum LVDS_script script, int pxclk)
{}

struct lvdstableheader {};

static int parse_lvds_manufacturer_table_header(struct drm_device *dev, struct nvbios *bios, struct lvdstableheader *lth)
{}

static int
get_fp_strap(struct drm_device *dev, struct nvbios *bios)
{}

static int parse_fp_mode_table(struct drm_device *dev, struct nvbios *bios)
{}

bool nouveau_bios_fp_mode(struct drm_device *dev, struct drm_display_mode *mode)
{}

int nouveau_bios_parse_lvds_table(struct drm_device *dev, int pxclk, bool *dl, bool *if_is_24bit)
{}

int run_tmds_table(struct drm_device *dev, struct dcb_output *dcbent, int head, int pxclk)
{}

static void parse_script_table_pointers(struct nvbios *bios, uint16_t offset)
{}

static int parse_bit_A_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry)
{}

static int parse_bit_display_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry)
{}

static int parse_bit_init_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry)
{}

static int parse_bit_i_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry)
{}

static int parse_bit_lvds_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry)
{}

static int
parse_bit_M_tbl_entry(struct drm_device *dev, struct nvbios *bios,
		      struct bit_entry *bitentry)
{}

static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry)
{}

struct bit_table {};

#define BIT_TABLE(id, funcid)

int
bit_table(struct drm_device *dev, u8 id, struct bit_entry *bit)
{}

static int
parse_bit_table(struct nvbios *bios, const uint16_t bitoffset,
		struct bit_table *table)
{}

static int
parse_bit_structure(struct nvbios *bios, const uint16_t bitoffset)
{}

static int parse_bmp_structure(struct drm_device *dev, struct nvbios *bios, unsigned int offset)
{}

static uint16_t findstr(uint8_t *data, int n, const uint8_t *str, int len)
{}

void *
olddcb_table(struct drm_device *dev)
{}

void *
olddcb_outp(struct drm_device *dev, u8 idx)
{}

int
olddcb_outp_foreach(struct drm_device *dev, void *data,
		 int (*exec)(struct drm_device *, void *, int idx, u8 *outp))
{}

u8 *
olddcb_conntab(struct drm_device *dev)
{}

u8 *
olddcb_conn(struct drm_device *dev, u8 idx)
{}

static struct dcb_output *new_dcb_entry(struct dcb_table *dcb)
{}

static void fabricate_dcb_output(struct dcb_table *dcb, int type, int i2c,
				 int heads, int or)
{}

static bool
parse_dcb20_entry(struct drm_device *dev, struct dcb_table *dcb,
		  uint32_t conn, uint32_t conf, struct dcb_output *entry)
{}

static bool
parse_dcb15_entry(struct drm_device *dev, struct dcb_table *dcb,
		  uint32_t conn, uint32_t conf, struct dcb_output *entry)
{}

static
void merge_like_dcb_entries(struct drm_device *dev, struct dcb_table *dcb)
{}

static bool
apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf)
{}

static void
fabricate_dcb_encoder_table(struct drm_device *dev, struct nvbios *bios)
{}

static int
parse_dcb_entry(struct drm_device *dev, void *data, int idx, u8 *outp)
{}

static void
dcb_fake_connectors(struct nvbios *bios)
{}

static int
parse_dcb_table(struct drm_device *dev, struct nvbios *bios)
{}

static int load_nv17_hwsq_ucode_entry(struct drm_device *dev, struct nvbios *bios, uint16_t hwsq_offset, int entry)
{}

static int load_nv17_hw_sequencer_ucode(struct drm_device *dev,
					struct nvbios *bios)
{}

uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev)
{}

static bool NVInitVBIOS(struct drm_device *dev)
{}

int
nouveau_run_vbios_init(struct drm_device *dev)
{}

static bool
nouveau_bios_posted(struct drm_device *dev)
{}

int
nouveau_bios_init(struct drm_device *dev)
{}

void
nouveau_bios_takedown(struct drm_device *dev)
{}