From: Damien Lespiau Subject: [PATCH i-g-t 24/26] mediafill/skl: Follow spec to configure FORCE_MEDIA_AWAKE in PIPELINE_SELECTION Date: Fri, 26 Sep 2014 15:03:22 +0100 Message-ID: <1411740204-25709-24-git-send-email-damien.lespiau@intel.com> References: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 7AA7A6E772 for ; Fri, 26 Sep 2014 07:05:13 -0700 (PDT) In-Reply-To: <1411740204-25709-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org From: Zhao Yakui The FORCE_MEDIA_AWAKE bit is added for the PIPELINE_SELECTION command and some instructions requires that the media enginee is awake. Signed-off-by: Zhao Yakui Signed-off-by: Ben Widawsky Signed-off-by: Damien Lespiau --- lib/gen8_media.h | 7 +++++++ lib/media_fill_gen9.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/gen8_media.h b/lib/gen8_media.h index d1df8b9..f654215 100644 --- a/lib/gen8_media.h +++ b/lib/gen8_media.h @@ -374,4 +374,11 @@ struct gen8_surface_state #define GEN9_PIPELINE_SELECTION_MASK (3 << 8) +/* If enabled, it will force awake media enginee and the following instructions + * will require that the media enginee is awake. + */ +#define GEN9_FORCE_MEDIA_AWAKE_DISABLE (0 << 5) +#define GEN9_FORCE_MEDIA_AWAKE_ENABLE (1 << 5) +#define GEN9_FORCE_MEDIA_AWAKE_MASK (1 << 13) + #endif /* GEN8_MEDIA_H */ diff --git a/lib/media_fill_gen9.c b/lib/media_fill_gen9.c index df0407d..4ecf268 100644 --- a/lib/media_fill_gen9.c +++ b/lib/media_fill_gen9.c @@ -363,7 +363,9 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch, /* media pipeline */ batch->ptr = batch->buffer; OUT_BATCH(GEN8_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA | - GEN9_PIPELINE_SELECTION_MASK); + GEN9_FORCE_MEDIA_AWAKE_ENABLE | + GEN9_PIPELINE_SELECTION_MASK | + GEN9_FORCE_MEDIA_AWAKE_MASK); gen9_emit_state_base_address(batch); gen8_emit_vfe_state(batch); @@ -374,6 +376,11 @@ gen9_media_fillfunc(struct intel_batchbuffer *batch, gen8_emit_media_objects(batch, x, y, width, height); + OUT_BATCH(GEN8_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA | + GEN9_FORCE_MEDIA_AWAKE_DISABLE | + GEN9_PIPELINE_SELECTION_MASK | + GEN9_FORCE_MEDIA_AWAKE_MASK); + OUT_BATCH(MI_BATCH_BUFFER_END); batch_end = batch_align(batch, 8); -- 1.8.3.1