From: Imre Deak <imre.deak@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/7] drm/i915: Add csr programming registers to dmc debugfs entry
Date: Thu, 29 Oct 2015 18:28:24 +0200 [thread overview]
Message-ID: <1446136104.28303.34.camel@intel.com> (raw)
In-Reply-To: <1445950025-5793-6-git-send-email-mika.kuoppala@intel.com>
On ti, 2015-10-27 at 14:47 +0200, Mika Kuoppala wrote:
> We check these to determine firmware loading status. Include
> them to help to debug causes of firmware loading fails.
>
> v2: Move all CSR specific registers to i915_reg.h (Ville)
> v3: Rebase
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 7 ++++++-
> drivers/gpu/drm/i915/i915_reg.h | 10 ++++++++++
> drivers/gpu/drm/i915/intel_csr.c | 13 -------------
> 3 files changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 7a61599..44b8c326 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2801,7 +2801,7 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
> seq_printf(m, "path: %s\n", csr->fw_path);
>
> if (!csr->dmc_payload)
> - return 0;
> + goto out;
>
> seq_printf(m, "version: %d.%d\n", CSR_VERSION_MAJOR(csr->version),
> CSR_VERSION_MINOR(csr->version));
> @@ -2816,6 +2816,11 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
> I915_READ(BXT_CSR_DC3_DC5_COUNT));
> }
>
> +out:
> + seq_printf(m, "program base: 0x%08x\n", I915_READ(CSR_PROGRAM(0)));
> + seq_printf(m, "ssp base: 0x%08x\n", I915_READ(CSR_SSP_BASE));
> + seq_printf(m, "htp: 0x%08x\n", I915_READ(CSR_HTP_SKL));
> +
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index c563ead..72bbed2 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5697,6 +5697,16 @@ enum skl_disp_power_wells {
> #define GAMMA_MODE_MODE_SPLIT (3 << 0)
>
> /* DMC/CSR */
> +#define CSR_PROGRAM(i) (0x80000 + (i) * 4)
> +#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0
> +#define CSR_HTP_ADDR_SKL 0x00500034
> +#define CSR_SSP_BASE 0x8F074
> +#define CSR_HTP_SKL 0x8F004
> +#define CSR_LAST_WRITE 0x8F034
> +#define CSR_LAST_WRITE_VALUE 0xc003b400
> +/* MMIO address range for CSR program (0x80000 - 0x82FFF) */
> +#define CSR_MMIO_START_RANGE 0x80000
> +#define CSR_MMIO_END_RANGE 0x8FFFF
> #define SKL_CSR_DC3_DC5_COUNT 0x80030
> #define SKL_CSR_DC5_DC6_COUNT 0x8002C
> #define BXT_CSR_DC3_DC5_COUNT 0x80038
> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> index 701c685..bd305da 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -50,21 +50,8 @@ MODULE_FIRMWARE(I915_CSR_BXT);
> #define SKL_REQUIRED_FW_MAJOR 1
> #define SKL_REQUIRED_FW_MINOR 23
>
> -/*
> -* SKL CSR registers for DC5 and DC6
> -*/
> -#define CSR_PROGRAM(i) (0x80000 + (i) * 4)
> -#define CSR_SSP_BASE_ADDR_GEN9 0x00002FC0
> -#define CSR_HTP_ADDR_SKL 0x00500034
> -#define CSR_SSP_BASE 0x8F074
> -#define CSR_HTP_SKL 0x8F004
> -#define CSR_LAST_WRITE 0x8F034
> -#define CSR_LAST_WRITE_VALUE 0xc003b400
> -/* MMIO address range for CSR program (0x80000 - 0x82FFF) */
> #define CSR_MAX_FW_SIZE 0x2FFF
> #define CSR_DEFAULT_FW_OFFSET 0xFFFFFFFF
> -#define CSR_MMIO_START_RANGE 0x80000
> -#define CSR_MMIO_END_RANGE 0x8FFFF
>
> struct intel_css_header {
> /* 0x09 for DMC */
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-29 16:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 12:46 [PATCH 1/7] drm/i915/skl: Store and print the DMC firmware version we load Mika Kuoppala
2015-10-27 12:47 ` [PATCH 2/7] drm/i915/skl: Refuse to load outdated dmc firmware Mika Kuoppala
2015-10-29 15:39 ` Imre Deak
2015-10-30 15:52 ` Mika Kuoppala
2015-11-03 21:49 ` Daniel Stone
2015-11-03 23:23 ` Vivi, Rodrigo
2015-11-04 9:51 ` Daniel Stone
2015-10-27 12:47 ` [PATCH 3/7] drm/i915/skl: Print the DMC firmware status in debugfs Mika Kuoppala
2015-10-29 15:50 ` Imre Deak
2015-10-27 12:47 ` [PATCH 4/7] drm/i915/skl: Expose DC5/DC6 entry counts Mika Kuoppala
2015-10-29 16:20 ` Imre Deak
2015-10-30 15:53 ` Mika Kuoppala
2015-10-27 12:47 ` [PATCH 5/7] drm/i915/bxt: Expose DC5 entry count Mika Kuoppala
2015-10-29 16:25 ` Imre Deak
2015-10-27 12:47 ` [PATCH 6/7] drm/i915: Add csr programming registers to dmc debugfs entry Mika Kuoppala
2015-10-29 16:28 ` Imre Deak [this message]
2015-10-30 15:54 ` Mika Kuoppala
2015-10-27 12:47 ` [PATCH 7/7] drm/i915: Add dmc firmware load state and version to error state Mika Kuoppala
2015-10-29 13:21 ` Mika Kuoppala
2015-10-29 15:21 ` [PATCH 1/7] drm/i915/skl: Store and print the DMC firmware version we load Imre Deak
2015-11-04 17:18 ` Daniel Stone
2015-11-09 17:29 ` Ville Syrjälä
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=1446136104.28303.34.camel@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.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