From: Jani Nikula <jani.nikula@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH 5/6] drm/xe: Build soc files directly
Date: Mon, 03 Apr 2023 11:12:27 +0300 [thread overview]
Message-ID: <87ttxx1j10.fsf@intel.com> (raw)
In-Reply-To: <7b069b9f-8208-77fc-1872-b49e7a8c2cca@linux.intel.com>
On Fri, 31 Mar 2023, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
> On 2023-03-31 13:49, Jani Nikula wrote:
>> On Fri, 31 Mar 2023, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
>>> Instead of making a copy that is hard to keep up to date, build the
>>> source directly.
>>>
>>> Add a rule for soc_* files, and use those to build i915.
>>>
>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>> ---
>>> drivers/gpu/drm/i915/soc/intel_dram.c | 30 +-
>>> drivers/gpu/drm/xe/Makefile | 8 +-
>>> .../gpu/drm/xe/compat-i915-headers/i915_drv.h | 2 +-
>>> .../soc}/intel_dram.h | 1 -
>>> .../soc}/intel_pch.h | 0
>>> drivers/gpu/drm/xe/display/ext/intel_dram.c | 495 ------------------
>>> drivers/gpu/drm/xe/display/ext/intel_pch.c | 157 ------
>>> drivers/gpu/drm/xe/xe_device_types.h | 2 +-
>>> drivers/gpu/drm/xe/xe_display.c | 2 +-
>>> 9 files changed, 28 insertions(+), 669 deletions(-)
>>> rename drivers/gpu/drm/xe/{display/ext => compat-i915-headers/soc}/intel_dram.h (80%)
>>> rename drivers/gpu/drm/xe/{display/ext => compat-i915-headers/soc}/intel_pch.h (100%)
>>> delete mode 100644 drivers/gpu/drm/xe/display/ext/intel_dram.c
>>> delete mode 100644 drivers/gpu/drm/xe/display/ext/intel_pch.c
>>>
>>> diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
>>> index 9649051ed8ed..13fe18a9372f 100644
>>> --- a/drivers/gpu/drm/i915/soc/intel_dram.c
>>> +++ b/drivers/gpu/drm/i915/soc/intel_dram.c
>>> @@ -9,8 +9,12 @@
>>> #include "i915_reg.h"
>>> #include "intel_dram.h"
>>> #include "intel_mchbar_regs.h"
>>> -#include "intel_pcode.h"
>>> +#ifdef I915
>>> #include "vlv_sideband.h"
>>> +#include "display/intel_de.h"
>>> +#else
>>> +#include "xe_de.h"
>>> +#endif
>>>
>>> struct dram_dimm_info {
>>> u16 size;
>>> @@ -43,6 +47,8 @@ static const char *intel_dram_type_str(enum intel_dram_type type)
>>>
>>> #undef DRAM_TYPE_STR
>>>
>>> +#ifdef I915
>>> +
>>> static void pnv_detect_mem_freq(struct drm_i915_private *dev_priv)
>>> {
>>> u32 tmp;
>>> @@ -191,6 +197,9 @@ static void detect_mem_freq(struct drm_i915_private *i915)
>>> if (i915->mem_freq)
>>> drm_dbg(&i915->drm, "DDR speed: %d MHz\n", i915->mem_freq);
>>> }
>>> +#else
>>> +#define detect_mem_freq(i915) do { } while (0)
>>> +#endif
>>>
>>> static int intel_dimm_num_devices(const struct dram_dimm_info *dimm)
>>> {
>>> @@ -339,14 +348,12 @@ skl_dram_get_channels_info(struct drm_i915_private *i915)
>>> u32 val;
>>> int ret;
>>>
>>> - val = intel_uncore_read(&i915->uncore,
>>> - SKL_MAD_DIMM_CH0_0_0_0_MCHBAR_MCMAIN);
>>> + val = intel_de_read(i915, SKL_MAD_DIMM_CH0_0_0_0_MCHBAR_MCMAIN);
>> This isn't great, because those aren't DE registers. So this won't fly
>> upstream.
>
> Could we do this for xe instead?
>
> #define intel_uncore_read(ignore, reg) xe_mmio_read32(i915, reg) ?
The obvious downside is that it relies on the implict variable i915,
which could also be named something else, and it has taken a long, long
time trying to fix those in i915.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-04-03 8:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 10:24 [Intel-xe] [PATCH 0/6] drm/xe: Meteorlake fixes Maarten Lankhorst
2023-03-31 10:24 ` [Intel-xe] [PATCH 1/6] drm/xe: Fix meteorlake stolen memory Maarten Lankhorst
2023-04-04 17:42 ` Lucas De Marchi
2023-03-31 10:24 ` [Intel-xe] [PATCH 2/6] drm/xe: Use full_gt batchbuffer allocation for media tiles Maarten Lankhorst
2023-04-03 20:27 ` Matt Roper
2023-04-04 6:59 ` Maarten Lankhorst
2023-04-06 14:17 ` Matt Roper
2023-03-31 10:24 ` [Intel-gfx] [PATCH 3/6] drm/i915: Fix comparison in intel_dram Maarten Lankhorst
2023-03-31 10:24 ` [Intel-xe] " Maarten Lankhorst
2023-04-03 20:35 ` [Intel-gfx] " Matt Roper
2023-04-03 20:35 ` Matt Roper
2023-04-03 20:48 ` [Intel-gfx] " Ville Syrjälä
2023-04-03 20:48 ` [Intel-xe] [Intel-gfx] " Ville Syrjälä
2023-04-04 6:51 ` [Intel-gfx] [Intel-xe] " Maarten Lankhorst
2023-04-04 6:51 ` Maarten Lankhorst
2023-04-04 0:10 ` [Intel-gfx] " Lucas De Marchi
2023-04-04 0:10 ` [Intel-xe] " Lucas De Marchi
2023-03-31 10:24 ` [Intel-xe] [PATCH 4/6] drm/xe: Fix XE_LPDP and meteorlake display info Maarten Lankhorst
2023-04-04 17:57 ` Lucas De Marchi
2023-03-31 10:24 ` [Intel-xe] [PATCH 5/6] drm/xe: Build soc files directly Maarten Lankhorst
2023-03-31 11:49 ` Jani Nikula
2023-03-31 12:01 ` Maarten Lankhorst
2023-04-03 8:12 ` Jani Nikula [this message]
2023-04-03 10:28 ` [Intel-xe] [PATCH v2 " Maarten Lankhorst
2023-04-19 14:43 ` Jani Nikula
2023-03-31 10:24 ` [Intel-xe] [PATCH 6/6] drm/xe: Fixup __intel_de_wait_for_register macro Maarten Lankhorst
2023-04-04 18:05 ` Lucas De Marchi
2023-03-31 10:26 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Meteorlake fixes Patchwork
2023-03-31 10:27 ` [Intel-xe] ✗ CI.KUnit: failure " Patchwork
2023-04-03 10:31 ` [Intel-xe] ✗ CI.Patch_applied: failure for drm/xe: Meteorlake fixes. (rev2) 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=87ttxx1j10.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=maarten.lankhorst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.