All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Deepak M <m.deepak@intel.com>
Subject: Re: [PATCH 01/15] drm/i915/bios: add proper documentation for the Video BIOS Table (VBT)
Date: Tue, 22 Dec 2015 14:40:06 +0200	[thread overview]
Message-ID: <87bn9i64ih.fsf@intel.com> (raw)
In-Reply-To: <3d826d4600688ca3518713776ab5bd8a8fc9f20f.1450702954.git.jani.nikula@intel.com>

On Mon, 21 Dec 2015, Jani Nikula <jani.nikula@intel.com> wrote:
> Add an overview and documentation for the VBT/BDB header structures.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Pushed this one patch to drm-intel-next-queued with Daniel's irc
ack. Fixed a small grammatical error while at it (*a* BDB Header).

BR,
Jani.

> ---
>  Documentation/DocBook/gpu.tmpl    |  6 ++++++
>  drivers/gpu/drm/i915/intel_bios.c | 24 +++++++++++++++++++++++-
>  drivers/gpu/drm/i915/intel_bios.h | 38 ++++++++++++++++++++++++++++----------
>  3 files changed, 57 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl
> index 6c6e81a9eaf4..f96a5d467f84 100644
> --- a/Documentation/DocBook/gpu.tmpl
> +++ b/Documentation/DocBook/gpu.tmpl
> @@ -3507,6 +3507,12 @@ int num_ioctls;</synopsis>
>  !Pdrivers/gpu/drm/i915/intel_csr.c csr support for dmc
>  !Idrivers/gpu/drm/i915/intel_csr.c
>        </sect2>
> +      <sect2>
> +	<title>Video BIOS Table (VBT)</title>
> +!Pdrivers/gpu/drm/i915/intel_bios.c Video BIOS Table (VBT)
> +!Idrivers/gpu/drm/i915/intel_bios.c
> +!Idrivers/gpu/drm/i915/intel_bios.h
> +      </sect2>
>      </sect1>
>  
>      <sect1>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index eba3e0f87181..d487f602a10e 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -31,6 +31,28 @@
>  #include "i915_drv.h"
>  #include "intel_bios.h"
>  
> +/**
> + * DOC: Video BIOS Table (VBT)
> + *
> + * The Video BIOS Table, or VBT, provides platform and board specific
> + * configuration information to the driver that is not discoverable or available
> + * through other means. The configuration is mostly related to display
> + * hardware. The VBT is available via the ACPI OpRegion or, on older systems, in
> + * the PCI ROM.
> + *
> + * The VBT consists of a VBT Header (defined as &struct vbt_header), BDB Header
> + * (&struct bdb_header), and a number of BIOS Data Blocks (BDB) that contain the
> + * actual configuration information. The VBT Header, and thus the VBT, begins
> + * with "$VBT" signature. The VBT Header contains the offset of the BDB
> + * Header. The data blocks are concatenated after the BDB Header. The data
> + * blocks have a 1-byte Block ID, 2-byte Block Size, and Block Size bytes of
> + * data. (Block 53, the MIPI Sequence Block is an exception.)
> + *
> + * The driver parses the VBT during load. The relevant information is stored in
> + * driver private data for ease of use, and the actual VBT is not read after
> + * that.
> + */
> +
>  #define	SLAVE_ADDR1	0x70
>  #define	SLAVE_ADDR2	0x72
>  
> @@ -1285,7 +1307,7 @@ static const struct vbt_header *find_vbt(void __iomem *bios, size_t size)
>  
>  /**
>   * intel_bios_init - find VBT and initialize settings from the BIOS
> - * @dev: DRM device
> + * @dev_priv: i915 device instance
>   *
>   * Loads the Video BIOS and checks that the VBT exists.  Sets scratch registers
>   * to appropriate values.
> diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
> index 54eac1003a1e..2dc46a98c332 100644
> --- a/drivers/gpu/drm/i915/intel_bios.h
> +++ b/drivers/gpu/drm/i915/intel_bios.h
> @@ -28,22 +28,40 @@
>  #ifndef _I830_BIOS_H_
>  #define _I830_BIOS_H_
>  
> +/**
> + * struct vbt_header - VBT Header structure
> + * @signature:		VBT signature, always starts with "$VBT"
> + * @version:		Version of this structure
> + * @header_size:	Size of this structure
> + * @vbt_size:		Size of VBT (VBT Header, BDB Header and data blocks)
> + * @vbt_checksum:	Checksum
> + * @reserved0:		Reserved
> + * @bdb_offset:		Offset of &struct bdb_header from beginning of VBT
> + * @aim_offset:		Offsets of add-in data blocks from beginning of VBT
> + */
>  struct vbt_header {
> -	u8 signature[20];		/**< Always starts with 'VBT$' */
> -	u16 version;			/**< decimal */
> -	u16 header_size;		/**< in bytes */
> -	u16 vbt_size;			/**< in bytes */
> +	u8 signature[20];
> +	u16 version;
> +	u16 header_size;
> +	u16 vbt_size;
>  	u8 vbt_checksum;
>  	u8 reserved0;
> -	u32 bdb_offset;			/**< from beginning of VBT */
> -	u32 aim_offset[4];		/**< from beginning of VBT */
> +	u32 bdb_offset;
> +	u32 aim_offset[4];
>  } __packed;
>  
> +/**
> + * struct bdb_header - BDB Header structure
> + * @signature:		BDB signature "BIOS_DATA_BLOCK"
> + * @version:		Version of the data block definitions
> + * @header_size:	Size of this structure
> + * @bdb_size:		Size of BDB (BDB Header and data blocks)
> + */
>  struct bdb_header {
> -	u8 signature[16];		/**< Always 'BIOS_DATA_BLOCK' */
> -	u16 version;			/**< decimal */
> -	u16 header_size;		/**< in bytes */
> -	u16 bdb_size;			/**< in bytes */
> +	u8 signature[16];
> +	u16 version;
> +	u16 header_size;
> +	u16 bdb_size;
>  } __packed;
>  
>  /* strictly speaking, this is a "skip" block, but it has interesting info */

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-12-22 12:40 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 13:10 [PATCH 00/15] drm/i915/bios: mipi sequence block v3, etc Jani Nikula
2015-12-21 13:10 ` [PATCH 01/15] drm/i915/bios: add proper documentation for the Video BIOS Table (VBT) Jani Nikula
2015-12-22 12:40   ` Jani Nikula [this message]
2015-12-21 13:10 ` [PATCH 02/15] drm/i915/bios: fix header define name for intel_bios.h Jani Nikula
2016-01-05 10:41   ` Daniel Vetter
2015-12-21 13:10 ` [PATCH 03/15] drm/i915/bios: split the MIPI DSI VBT block parsing to two Jani Nikula
2016-01-05 10:43   ` Daniel Vetter
2015-12-21 13:10 ` [PATCH 04/15] drm/i915/bios: have get_blocksize() support MIPI sequence block v3+ Jani Nikula
2016-01-05 10:45   ` Daniel Vetter
2016-01-05 13:01     ` Jani Nikula
2015-12-21 13:10 ` [PATCH 05/15] drm/i915/bios: abstract finding the panel sequence block Jani Nikula
2016-01-05 10:53   ` Daniel Vetter
2016-01-05 12:45     ` Jani Nikula
2016-01-05 13:59       ` Daniel Vetter
2016-01-05 13:50   ` [PATCH v2] " Jani Nikula
2015-12-21 13:10 ` [PATCH 06/15] drm/i915/bios: rewrite sequence block parsing Jani Nikula
2016-01-05 14:12   ` Daniel Vetter
2015-12-21 13:10 ` [PATCH 07/15] drm/i915/dsi: be defensive about out of bounds sequence id Jani Nikula
2016-01-05 14:12   ` Daniel Vetter
2015-12-21 13:10 ` [PATCH 08/15] drm/i915/dsi: be defensive about out of bounds operation byte Jani Nikula
2016-01-05 14:15   ` Daniel Vetter
2016-01-05 14:44     ` Jani Nikula
2015-12-21 13:11 ` [PATCH 09/15] drm/i915/bios: interpret the i2c element Jani Nikula
2016-01-05 19:21   ` Ville Syrjälä
2016-01-07  9:31     ` Jani Nikula
2016-01-07 14:16       ` Ville Syrjälä
2016-01-11 12:46         ` Jani Nikula
2016-01-11 16:01           ` Ville Syrjälä
2015-12-21 13:11 ` [PATCH 10/15] drm/i915/bios: add sequences for MIPI sequence block v2 Jani Nikula
2016-01-07 14:39   ` Ville Syrjälä
2016-01-07 14:54     ` Jani Nikula
2016-01-07 15:07       ` Ville Syrjälä
2015-12-21 13:11 ` [PATCH 11/15] drm/i915: Adding the parsing logic for the i2c element Jani Nikula
2016-01-07 15:05   ` Ville Syrjälä
2016-01-11 12:49     ` Jani Nikula
2016-01-11 13:31       ` Jani Nikula
2016-01-11 16:08         ` Ville Syrjälä
2016-01-11 13:29   ` [REPLACEMENT PATCH 11/15] drm/i915: skip the i2c element in the generic VBT DSI driver Jani Nikula
2016-01-11 15:56     ` Ville Syrjälä
2015-12-21 13:11 ` [PATCH 12/15] drm/i915/bios: add defines for v3 sequence block Jani Nikula
2016-01-07 15:27   ` Ville Syrjälä
2015-12-21 13:11 ` [PATCH 13/15] drm/i915/bios: add support for MIPI sequence block v3 Jani Nikula
2016-01-05 15:01   ` [PATCH v2] " Jani Nikula
2016-01-08 11:44     ` Ville Syrjälä
2016-01-11 13:15     ` [PATCH v3] " Jani Nikula
2016-01-11 15:51       ` Ville Syrjälä
2015-12-21 13:11 ` [PATCH 14/15] drm/i915/dsi: skip unknown elements for sequence block v3+ Jani Nikula
2016-01-05 14:19   ` Daniel Vetter
2016-01-05 14:54     ` Jani Nikula
2016-01-05 15:06   ` [PATCH v2] " Jani Nikula
2015-12-21 13:11 ` [PATCH 15/15] drm/i915/dsi: reduce tedious repetition Jani Nikula
2016-01-05 14:25   ` Daniel Vetter
2015-12-21 13:27 ` ✗ warning: Fi.CI.BAT Patchwork
2015-12-22  8:40 ` [PATCH 00/15] drm/i915/bios: mipi sequence block v3, etc Jani Nikula
2016-01-05 15:08 ` [PATCH] drm/i915/dsi: add debug printing of the new sequence block names Jani Nikula
2016-01-08 11:46   ` Ville Syrjälä
2016-01-05 16:01 ` ✗ failure: Fi.CI.BAT Patchwork
2016-01-11 13:30 ` [PATCH v5] drm/i915: Adding the parsing logic for the i2c element Jani Nikula
2016-01-11 13:32   ` Jani Nikula
2016-01-11 17:26     ` Jani Nikula
2016-01-11 13:30 ` ✗ failure: Fi.CI.BAT Patchwork
2016-01-11 14:01 ` Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bn9i64ih.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=m.deepak@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.