From: Michel Thierry <michel.thierry@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v4 11/13] drm/i915/guc: Handle default action received over CT
Date: Fri, 23 Mar 2018 16:29:57 -0700 [thread overview]
Message-ID: <66050edb-998a-9fce-c58a-0500a2d5ddd5@intel.com> (raw)
In-Reply-To: <20180323144728.61548-12-michal.wajdeczko@intel.com>
On 3/23/2018 7:47 AM, Michal Wajdeczko wrote:
> When running on platform with CTB based GuC communication enabled,
> GuC to Host event data will be delivered as CT request message.
> However, content of the data[1] of this CT message follows format
> of the scratch register used in MMIO based communication, so some
> code reuse is still possible.
>
Spoiler alert, some g2h messages (reset-engine and preemption afaik)
will send us more data, so just passing request->data[1] won't be enough
¯\_(ツ)_/¯
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Oscar Mateo <oscar.mateo@intel.com>
> ---
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
> drivers/gpu/drm/i915/intel_guc.c | 5 +++++
> drivers/gpu/drm/i915/intel_guc.h | 1 +
> drivers/gpu/drm/i915/intel_guc_ct.c | 9 +++++++++
> 3 files changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
> index 118db81..b6d2778 100644
> --- a/drivers/gpu/drm/i915/intel_guc.c
> +++ b/drivers/gpu/drm/i915/intel_guc.c
> @@ -416,6 +416,11 @@ void intel_guc_to_host_event_handler_mmio(struct intel_guc *guc)
> I915_WRITE(SOFT_SCRATCH(15), val & ~msg);
> spin_unlock(&guc->irq_lock);
>
> + intel_guc_to_host_process_recv_msg(guc, msg);
> +}
> +
> +void intel_guc_to_host_process_recv_msg(struct intel_guc *guc, u32 msg)
> +{
> if (msg & (INTEL_GUC_RECV_MSG_FLUSH_LOG_BUFFER |
> INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED))
> intel_guc_log_handle_flush_event(&guc->log);
> diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
> index 6dc109a..f1265e1 100644
> --- a/drivers/gpu/drm/i915/intel_guc.h
> +++ b/drivers/gpu/drm/i915/intel_guc.h
> @@ -163,6 +163,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len,
> void intel_guc_to_host_event_handler(struct intel_guc *guc);
> void intel_guc_to_host_event_handler_nop(struct intel_guc *guc);
> void intel_guc_to_host_event_handler_mmio(struct intel_guc *guc);
> +void intel_guc_to_host_process_recv_msg(struct intel_guc *guc, u32 msg);
> int intel_guc_sample_forcewake(struct intel_guc *guc);
> int intel_guc_auth_huc(struct intel_guc *guc, u32 rsa_offset);
> int intel_guc_suspend(struct intel_guc *guc);
> diff --git a/drivers/gpu/drm/i915/intel_guc_ct.c b/drivers/gpu/drm/i915/intel_guc_ct.c
> index 90aff51..9bc8738 100644
> --- a/drivers/gpu/drm/i915/intel_guc_ct.c
> +++ b/drivers/gpu/drm/i915/intel_guc_ct.c
> @@ -644,8 +644,17 @@ static int ct_handle_response(struct intel_guc_ct *ct, const u32 *msg)
> static void ct_dispatch_request(struct intel_guc_ct *ct,
> u32 action, u32 len, const u32 *payload)
> {
> + struct intel_guc *guc = ct_to_guc(ct);
> +
> switch (action) {
> + case INTEL_GUC_ACTION_DEFAULT:
> + if (unlikely(len < 1))
> + goto fail_unexpected;
> + intel_guc_to_host_process_recv_msg(guc, *payload);
> + break;
> +
> default:
> +fail_unexpected:
> DRM_ERROR("CT: unexpected request %x %*phn\n",
> action, 4*len, payload);
> break;
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-03-23 23:29 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 14:47 [PATCH v4 00/13] drm/i915/guc: Support for Guc responses and requests Michal Wajdeczko
2018-03-23 14:47 ` [PATCH v4 01/13] drm/i915/guc: Add documentation for MMIO based communication Michal Wajdeczko
2018-03-23 21:29 ` Michel Thierry
2018-03-24 7:09 ` Michal Wajdeczko
2018-03-23 14:47 ` [PATCH v4 02/13] drm/i915/guc: Add support for data reporting in GuC responses Michal Wajdeczko
2018-03-23 21:33 ` Michel Thierry
2018-03-23 14:47 ` [PATCH v4 03/13] drm/i915/guc: Prepare send() function to accept bigger response Michal Wajdeczko
2018-03-23 21:48 ` Michel Thierry
2018-03-23 14:47 ` [PATCH v4 04/13] drm/i915/guc: Implement response handling in send_mmio() Michal Wajdeczko
2018-03-23 21:55 ` Michel Thierry
2018-03-24 7:09 ` Michal Wajdeczko
2018-03-23 14:47 ` [PATCH v4 05/13] drm/i915/guc: Make event handler a virtual function Michal Wajdeczko
2018-03-23 22:25 ` Michel Thierry
2018-03-24 7:14 ` Michal Wajdeczko
2018-03-23 14:47 ` [PATCH v4 06/13] drm/i915/guc: Prepare to handle messages from CT RECV buffer Michal Wajdeczko
2018-03-23 22:39 ` Michel Thierry
2018-03-23 14:47 ` [PATCH v4 07/13] drm/i915/guc: Use better name for helper wait function Michal Wajdeczko
2018-03-23 22:35 ` Michel Thierry
2018-03-23 14:47 ` [PATCH v4 08/13] drm/i915/guc: Implement response handling in send_ct() Michal Wajdeczko
2018-03-23 22:55 ` Michel Thierry
2018-03-26 15:29 ` Michał Winiarski
2018-03-26 15:35 ` Jani Nikula
2018-03-26 16:48 ` Michal Wajdeczko
2018-03-26 16:39 ` Michal Wajdeczko
2018-03-23 14:47 ` [PATCH v4 09/13] drm/i915/guc: Prepare to process incoming requests from CT Michal Wajdeczko
2018-03-23 23:23 ` Michel Thierry
2018-03-23 14:47 ` [PATCH v4 10/13] drm/i915/guc: Enable GuC interrupts when using CT Michal Wajdeczko
2018-03-23 23:02 ` Michel Thierry
2018-03-23 14:47 ` [PATCH v4 11/13] drm/i915/guc: Handle default action received over CT Michal Wajdeczko
2018-03-23 23:29 ` Michel Thierry [this message]
2018-03-23 14:47 ` [PATCH v4 12/13] drm/i915/guc: Trace messages from CT while in debug Michal Wajdeczko
2018-03-23 14:47 ` [PATCH v4 13/13] HAX: Enable GuC for CI Michal Wajdeczko
2018-03-23 16:43 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc: Support for Guc responses and requests (rev2) Patchwork
2018-03-23 16:47 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-03-23 16:58 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-23 19:32 ` ✗ Fi.CI.IGT: failure " 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=66050edb-998a-9fce-c58a-0500a2d5ddd5@intel.com \
--to=michel.thierry@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michal.wajdeczko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox