Skip to content

Commit

Permalink
drm/i915/guc: work around gcc-4.4.4 union initializer issue
Browse files Browse the repository at this point in the history
gcc-4.4.4 has problems with initalizers of anon unions.

drivers/gpu/drm/i915/intel_guc_log.c: In function 'guc_log_control':
drivers/gpu/drm/i915/intel_guc_log.c:64: error: unknown field 'logging_enabled' specified in initializer

Work around this.

Fixes: 35fe703 ("drm/i915/guc: Change values for i915_guc_log_control")
Cc: Michal Wajdeczko <[email protected]>
Cc: Sagar Arun Kamble <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Chris Wilson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20180308001333.rI2vrNRTY%[email protected]
  • Loading branch information
akpm00 authored and jnikula committed Mar 8, 2018
1 parent a4713c5 commit 401d0ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/intel_guc_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ static int guc_log_flush(struct intel_guc *guc)
static int guc_log_control(struct intel_guc *guc, bool enable, u32 verbosity)
{
union guc_log_control control_val = {
.logging_enabled = enable,
.verbosity = verbosity,
{
.logging_enabled = enable,
.verbosity = verbosity,
},
};
u32 action[] = {
INTEL_GUC_ACTION_UK_LOG_ENABLE_LOGGING,
Expand Down

0 comments on commit 401d0ae

Please sign in to comment.