* [PATCH] drm/i915/bios: add missing __packed to structs used for reading vbt
@ 2014-09-15 13:47 Jani Nikula
2014-09-15 13:59 ` [PATCH v2] " Jani Nikula
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2014-09-15 13:47 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
This does not seem to make a difference for the structs in question, but
document the intent.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_bios.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 905999bee2ac..eaaf1ab75554 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -46,7 +46,7 @@ struct bdb_header {
u16 version; /**< decimal */
u16 header_size; /**< in bytes */
u16 bdb_size; /**< in bytes */
-};
+} __packed;
/* strictly speaking, this is a "skip" block, but it has interesting info */
struct vbios_data {
@@ -888,12 +888,12 @@ struct mipi_pps_data {
u16 bl_disable_delay;
u16 panel_off_delay;
u16 panel_power_cycle_delay;
-};
+} __packed;
struct bdb_mipi_config {
struct mipi_config config[MAX_MIPI_CONFIGURATIONS];
struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS];
-};
+} __packed;
/* Block 53 contains MIPI sequences as needed by the panel
* for enabling it. This block can be variable in size and
@@ -902,7 +902,7 @@ struct bdb_mipi_config {
struct bdb_mipi_sequence {
u8 version;
u8 data[0];
-};
+} __packed;
/* MIPI Sequnece Block definitions */
enum mipi_seq {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH v2] drm/i915/bios: add missing __packed to structs used for reading vbt
2014-09-15 13:47 [PATCH] drm/i915/bios: add missing __packed to structs used for reading vbt Jani Nikula
@ 2014-09-15 13:59 ` Jani Nikula
2014-09-15 14:06 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2014-09-15 13:59 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
This does not seem to make a difference for the structs in question, but
document the intent.
v2: also pack union child_device_config (Daniel)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_bios.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
index 905999bee2ac..7603765c91fc 100644
--- a/drivers/gpu/drm/i915/intel_bios.h
+++ b/drivers/gpu/drm/i915/intel_bios.h
@@ -46,7 +46,7 @@ struct bdb_header {
u16 version; /**< decimal */
u16 header_size; /**< in bytes */
u16 bdb_size; /**< in bytes */
-};
+} __packed;
/* strictly speaking, this is a "skip" block, but it has interesting info */
struct vbios_data {
@@ -252,7 +252,7 @@ union child_device_config {
/* This one should also be safe to use anywhere, even without version
* checks. */
struct common_child_dev_config common;
-};
+} __packed;
struct bdb_general_definitions {
/* DDC GPIO */
@@ -888,12 +888,12 @@ struct mipi_pps_data {
u16 bl_disable_delay;
u16 panel_off_delay;
u16 panel_power_cycle_delay;
-};
+} __packed;
struct bdb_mipi_config {
struct mipi_config config[MAX_MIPI_CONFIGURATIONS];
struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS];
-};
+} __packed;
/* Block 53 contains MIPI sequences as needed by the panel
* for enabling it. This block can be variable in size and
@@ -902,7 +902,7 @@ struct bdb_mipi_config {
struct bdb_mipi_sequence {
u8 version;
u8 data[0];
-};
+} __packed;
/* MIPI Sequnece Block definitions */
enum mipi_seq {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] drm/i915/bios: add missing __packed to structs used for reading vbt
2014-09-15 13:59 ` [PATCH v2] " Jani Nikula
@ 2014-09-15 14:06 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-09-15 14:06 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Mon, Sep 15, 2014 at 04:59:28PM +0300, Jani Nikula wrote:
> This does not seem to make a difference for the structs in question, but
> document the intent.
>
> v2: also pack union child_device_config (Daniel)
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_bios.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.h b/drivers/gpu/drm/i915/intel_bios.h
> index 905999bee2ac..7603765c91fc 100644
> --- a/drivers/gpu/drm/i915/intel_bios.h
> +++ b/drivers/gpu/drm/i915/intel_bios.h
> @@ -46,7 +46,7 @@ struct bdb_header {
> u16 version; /**< decimal */
> u16 header_size; /**< in bytes */
> u16 bdb_size; /**< in bytes */
> -};
> +} __packed;
>
> /* strictly speaking, this is a "skip" block, but it has interesting info */
> struct vbios_data {
> @@ -252,7 +252,7 @@ union child_device_config {
> /* This one should also be safe to use anywhere, even without version
> * checks. */
> struct common_child_dev_config common;
> -};
> +} __packed;
>
> struct bdb_general_definitions {
> /* DDC GPIO */
> @@ -888,12 +888,12 @@ struct mipi_pps_data {
> u16 bl_disable_delay;
> u16 panel_off_delay;
> u16 panel_power_cycle_delay;
> -};
> +} __packed;
>
> struct bdb_mipi_config {
> struct mipi_config config[MAX_MIPI_CONFIGURATIONS];
> struct mipi_pps_data pps[MAX_MIPI_CONFIGURATIONS];
> -};
> +} __packed;
>
> /* Block 53 contains MIPI sequences as needed by the panel
> * for enabling it. This block can be variable in size and
> @@ -902,7 +902,7 @@ struct bdb_mipi_config {
> struct bdb_mipi_sequence {
> u8 version;
> u8 data[0];
> -};
> +} __packed;
>
> /* MIPI Sequnece Block definitions */
> enum mipi_seq {
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-15 14:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 13:47 [PATCH] drm/i915/bios: add missing __packed to structs used for reading vbt Jani Nikula
2014-09-15 13:59 ` [PATCH v2] " Jani Nikula
2014-09-15 14:06 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox