Skip to content
  1. Oct 28, 2022
  2. Oct 27, 2022
    • Karolina Drobnik's avatar
      i915/i915_gem_context: Remove debug message in i915_gem_context_create_ioctl · 67f99e34
      Karolina Drobnik authored
      We know that as long as GEM context create ioctl succeeds, a context was
      created. There is no need to write about it, especially when such a message
      heavily pollutes dmesg and makes debugging actual errors harder.
      
      Since commit baa89ba3
      
       ("drm/i915/gem: initial conversion to new
      logging macros using coccinelle"), the logging for creating a new user
      context was moved under the driver debug output (for lack of a means for
      per-user logs, and a lack of user-focused drm.debug parameter). This
      only reveals how obnoxious having that spam be part of the driver debug
      logs, so remove it. [ from Chris Wilson ]
      
      Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarKarolina Drobnik <karolina.drobnik@intel.com>
      Cc: Andi Shyti <andi.shyti@linux.intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221025091903.986819-1-karolina.drobnik@intel.com
      67f99e34
    • Robert Beckett's avatar
      drm/i915: stop abusing swiotlb_max_segment · 78a07fe7
      Robert Beckett authored
      swiotlb_max_segment used to return either the maximum size that swiotlb
      could bounce, or for Xen PV PAGE_SIZE even if swiotlb could bounce buffer
      larger mappings.  This made i915 on Xen PV work as it bypasses the
      coherency aspect of the DMA API and can't cope with bounce buffering
      and this avoided bounce buffering for the Xen/PV case.
      
      So instead of adding this hack back, check for Xen/PV directly in i915
      for the Xen case and otherwise use the proper DMA API helper to query
      the maximum mapping size.
      
      Replace swiotlb_max_segment() calls with dma_max_mapping_size().
      In i915_gem_object_get_pages_internal() no longer consider max_segment
      only if CONFIG_SWIOTLB is enabled. There can be other (iommu related)
      causes of specific max segment sizes.
      
      Fixes: a2daa27c
      
       ("swiotlb: simplify swiotlb_max_segment")
      Reported-by: default avatarMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
      Signed-off-by: default avatarRobert Beckett <bob.beckett@collabora.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      [hch: added the Xen hack, rewrote the changelog]
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221020110308.1582518-1-hch@lst.de
      78a07fe7
    • Matthew Auld's avatar
      Revert "drm/i915/uapi: expose GTT alignment" · b0feda9c
      Matthew Auld authored
      The process for merging uAPI is to have UMD side ready and reviewed and
      merged before merging. Revert for now until that is ready.
      
      This reverts commit d54576a0
      
      .
      
      Reported-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: Michal Mrozek <michal.mrozek@intel.com>
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Cc: Stuart Summers <stuart.summers@intel.com>
      Cc: Jordan Justen <jordan.l.justen@intel.com>
      Cc: Yang A Shi <yang.a.shi@intel.com>
      Cc: Nirmoy Das <nirmoy.das@intel.com>
      Cc: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
      Reviewed-by: default avatarNirmoy Das <nirmoy.das@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221024101946.28974-1-matthew.auld@intel.com
      b0feda9c
    • Alan Previn's avatar
      drm/i915/guc: Remove intel_context:number_committed_requests counter · a7ac9d84
      Alan Previn authored
      
      
      With the introduction of the delayed disable-sched behavior,
      we use the GuC's xarray of valid guc-id's as a way to
      identify if new requests had been added to a context
      when the said context is being checked for closure.
      
      Additionally that prior change also closes the race for when
      a new incoming request fails to cancel the pending
      delayed disable-sched worker.
      
      With these two complementary checks, we see no more
      use for intel_context:guc_state:number_committed_requests.
      
      Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
      Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221006225121.826257-3-alan.previn.teres.alexis@intel.com
      a7ac9d84
    • Matthew Brost's avatar
      drm/i915/guc: Delay disabling guc_id scheduling for better hysteresis · 83321094
      Matthew Brost authored
      
      
      Add a delay, configurable via debugfs (default 34ms), to disable
      scheduling of a context after the pin count goes to zero. Disable
      scheduling is a costly operation as it requires synchronizing with
      the GuC. So the idea is that a delay allows the user to resubmit
      something before doing this operation. This delay is only done if
      the context isn't closed and less than a given threshold
      (default is 3/4) of the guc_ids are in use.
      
      Alan Previn: Matt Brost first introduced this patch back in Oct 2021.
      However no real world workload with measured performance impact was
      available to prove the intended results. Today, this series is being
      republished in response to a real world workload that benefited greatly
      from it along with measured performance improvement.
      
      Workload description: 36 containers were created on a DG2 device where
      each container was performing a combination of 720p 3d game rendering
      and 30fps video encoding. The workload density was configured in a way
      that guaranteed each container to ALWAYS be able to render and
      encode no less than 30fps with a predefined maximum render + encode
      latency time. That means the totality of all 36 containers and their
      workloads were not saturating the engines to their max (in order to
      maintain just enough headrooom to meet the min fps and max latencies
      of incoming container submissions).
      
      Problem statement: It was observed that the CPU core processing the i915
      soft IRQ work was experiencing severe load. Using tracelogs and an
      instrumentation patch to count specific i915 IRQ events, it was confirmed
      that the majority of the CPU cycles were caused by the
      gen11_other_irq_handler() -> guc_irq_handler() code path. The vast
      majority of the cycles was determined to be processing a specific G2H
      IRQ: i.e. INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_DONE. These IRQs are sent
      by GuC in response to i915 KMD sending H2G requests:
      INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_SET. Those H2G requests are sent
      whenever a context goes idle so that we can unpin the context from GuC.
      The high CPU utilization % symptom was limiting density scaling.
      
      Root Cause Analysis: Because the incoming execution buffers were spread
      across 36 different containers (each with multiple contexts) but the
      system in totality was NOT saturated to the max, it was assumed that each
      context was constantly idling between submissions. This was causing
      a thrashing of unpinning contexts from GuC at one moment, followed quickly
      by repinning them due to incoming workload the very next moment. These
      event-pairs were being triggered across multiple contexts per container,
      across all containers at the rate of > 30 times per sec per context.
      
      Metrics: When running this workload without this patch, we measured an
      average of ~69K INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_DONE events every 10
      seconds or ~10 million times over ~25+ mins. With this patch, the count
      reduced to ~480 every 10 seconds or about ~28K over ~10 mins. The
      improvement observed is ~99% for the average counts per 10 seconds.
      
      Design awareness: Selftest impact.
      As temporary WA disable this feature for the selftests. Selftests are
      very timing sensitive and any change in timing can cause failure. A
      follow up patch will fixup the selftests to understand this delay.
      
      Design awareness: Race between guc_request_alloc and guc_context_close.
      If a context close is issued while there is a request submission in
      flight and a delayed schedule disable is pending, guc_context_close
      and guc_request_alloc will race to cancel the delayed disable.
      To close the race, make sure that guc_request_alloc waits for
      guc_context_close to finish running before checking any state.
      
      Design awareness: GT Reset event.
      If a gt reset is triggered, as preparation steps, add an additional step
      to ensure all contexts that have a pending delay-disable-schedule task
      be flushed of it. Move them directly into the closed state after cancelling
      the worker. This is okay because the existing flow flushes all
      yet-to-arrive G2H's dropping them anyway.
      
      Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
      Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221006225121.826257-2-alan.previn.teres.alexis@intel.com
      83321094
    • Alan Previn's avatar
      drm/i915/guc: Fix GuC error capture sizing estimation and reporting · befb231d
      Alan Previn authored
      During GuC error capture initialization, we estimate the amount of size
      we need for the error-capture-region of the shared GuC-log-buffer.
      This calculation was incorrect so fix that. With the fixed calculation
      we can reduce the allocation of error-capture region from 4MB to 1MB
      (see note2 below for reasoning). Additionally, switch from drm_notice to
      drm_debug for the 3X spare size check since that would be impossible to
      hit without redesigning gpu_coredump framework to hold multiple captures.
      
      NOTE1: Even for 1x the min size estimation case, actually running out
      of space is a corner case because it can only occur if all engine
      instances get reset all at once and i915 isn't able extract the capture
      data fast enough within G2H handler worker.
      
      NOTE2: With the corrected calculation, a DG2 part required ~77K and a PVC
      required ~115K (1X min-est-size that is calculated as one-shot all-engine-
      reset scenario).
      
      Fixes: d7c15d76
      
       ("drm/i915/guc: Check sizing of guc_capture output")
      Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
      Cc: Matthew Brost <matthew.brost@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: John Harrison <John.C.Harrison@Intel.com>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Chris Wilson <chris.p.wilson@intel.com>
      Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
      Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221026060506.1007830-2-alan.previn.teres.alexis@intel.com
      befb231d
    • Vinay Belgaumkar's avatar
      drm/i915/slpc: Use platform limits for min/max frequency · 37d52e44
      Vinay Belgaumkar authored
      
      
      GuC will set the min/max frequencies to theoretical max on
      ATS-M. This will break kernel ABI, so limit min/max frequency
      to RP0(platform max) instead.
      
      Also modify the SLPC selftest to update the min frequency
      when we have a server part so that we can iterate between
      platform min and max.
      
      v2: Check softlimits instead of platform limits (Riana)
      v3: More review comments (Ashutosh)
      v4: No need to use saved_min_freq and other comments (Ashutosh)
      
      Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7030
      
      Acked-by: default avatarNirmoy Das <nirmoy.das@intel.com>
      Reviewed-by: default avatarRiana Tauro <riana.tauro@intel.com>
      Signed-off-by: default avatarVinay Belgaumkar <vinay.belgaumkar@intel.com>
      Reviewed-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221024225453.4856-1-vinay.belgaumkar@intel.com
      37d52e44
    • Vinay Belgaumkar's avatar
      drm/i915/slpc: Optmize waitboost for SLPC · f864a29a
      Vinay Belgaumkar authored
      
      
      Waitboost (when SLPC is enabled) results in a H2G message. This can result
      in thousands of messages during a stress test and fill up an already full
      CTB. There is no need to request for boost if min softlimit is equal or
      greater than it.
      
      v2: Add the tracing back, and check requested freq
      in the worker thread (Tvrtko)
      v3: Check requested freq in dec_waiters as well
      v4: Only check min_softlimit against boost_freq. Limit this
      optimization for server parts for now.
      v5: min_softlimit can be greater than boost (Ashutosh)
      
      Reviewed-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
      Signed-off-by: default avatarVinay Belgaumkar <vinay.belgaumkar@intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221024171108.14373-1-vinay.belgaumkar@intel.com
      f864a29a
    • Gustavo Sousa's avatar
      drm/i915/xelp: Add Wa_1806527549 · e62f31e1
      Gustavo Sousa authored
      
      
      Workaround to be applied to platforms using XE_LP graphics.
      
      BSpec: 52890
      Signed-off-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221019161334.119885-1-gustavo.sousa@intel.com
      e62f31e1
  3. Oct 25, 2022
    • Alan Previn's avatar
      drm/i915/guc: Add compute reglist for guc err capture · 5f8a3f65
      Alan Previn authored
      
      
      We missed this at initial upstream because at that time
      none of the GuC enabled platforms had a compute engine.
      Add this now.
      
      Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
      Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221019072930.17755-3-alan.previn.teres.alexis@intel.com
      5f8a3f65
    • Alan Previn's avatar
      drm/i915/guc: Add error-capture init warnings when needed · a8940778
      Alan Previn authored
      
      
      If GuC is being used and we initialized GuC-error-capture,
      we need to be warning if we don't provide an error-capture
      register list in the firmware ADS, for valid GT engines.
      A warning makes sense as this would impact debugability
      without realizing why a reglist wasn't retrieved and reported
      by GuC.
      
      However, depending on the platform, we might have certain
      engines that have a register list for engine instance error state
      but not for engine class. Thus, add a check only to warn if the
      register list was non existent vs an empty list (use the
      empty lists to skip the warning).
      
      NOTE: if a future platform were to introduce new registers
      in place of what was an empty list on existing / legacy hardware
      engines no warning is provided as the empty list is meant
      to be used intentionally. As an example, if a future hardware
      were to add blitter engine-class-registers (new) on top
      of the legacy blitter engine-instance-register (HEAD, TAIL, etc.),
      no warning is generated.
      
      Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
      Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221019072930.17755-2-alan.previn.teres.alexis@intel.com
      a8940778
    • John Harrison's avatar
      drm/i915: Improve long running compute w/a for GuC submission · d7a8680e
      John Harrison authored
      
      
      A workaround was added to the driver to allow compute workloads to run
      'forever' by disabling pre-emption on the RCS engine for Gen12.
      It is not totally unbound as the heartbeat will kick in eventually
      and cause a reset of the hung engine.
      
      However, this does not work well in GuC submission mode. In GuC mode,
      the pre-emption timeout is how GuC detects hung contexts and triggers
      a per engine reset. Thus, disabling the timeout means also losing all
      per engine reset ability. A full GT reset will still occur when the
      heartbeat finally expires, but that is a much more destructive and
      undesirable mechanism.
      
      The purpose of the workaround is actually to give compute tasks longer
      to reach a pre-emption point after a pre-emption request has been
      issued. This is necessary because Gen12 does not support mid-thread
      pre-emption and compute tasks can have long running threads.
      
      So, rather than disabling the timeout completely, just set it to a
      'long' value.
      
      v2: Review feedback from Tvrtko - must hard code the 'long' value
      instead of determining it algorithmically. So make it an extra CONFIG
      definition. Also, remove the execlist centric comment from the
      existing pre-emption timeout CONFIG option given that it applies to
      more than just execlists.
      
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Acked-by: default avatarMichal Mrozek <michal.mrozek@intel.com>
      Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-5-John.C.Harrison@Intel.com
      d7a8680e
    • John Harrison's avatar
      drm/i915: Make the heartbeat play nice with long pre-emption timeouts · 47daf84a
      John Harrison authored
      
      
      Compute workloads are inherently not pre-emptible for long periods on
      current hardware. As a workaround for this, the pre-emption timeout
      for compute capable engines was disabled. This is undesirable with GuC
      submission as it prevents per engine reset of hung contexts. Hence the
      next patch will re-enable the timeout but bumped up by an order of
      magnitude.
      
      However, the heartbeat might not respect that. Depending upon current
      activity, a pre-emption to the heartbeat pulse might not even be
      attempted until the last heartbeat period. Which means that only one
      period is granted for the pre-emption to occur. With the aforesaid
      bump, the pre-emption timeout could be significantly larger than this
      heartbeat period.
      
      So adjust the heartbeat code to take the pre-emption timeout into
      account. When it reaches the final (high priority) period, it now
      ensures the delay before hitting reset is bigger than the pre-emption
      timeout.
      
      v2: Fix for selftests which adjust the heartbeat period manually.
      v3: Add FIXME comment about selftests. Add extra FIXME comment and
      drm_notices when setting heartbeat to a non-default value (review
      feedback from Tvrtko)
      
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-4-John.C.Harrison@Intel.com
      47daf84a
    • John Harrison's avatar
      drm/i915: Fix compute pre-emption w/a to apply to compute engines · c3bd49cd
      John Harrison authored
      An earlier patch added support for compute engines. However, it missed
      enabling the anti-pre-emption w/a for the new engine class. So move
      the 'compute capable' flag earlier and use it for the pre-emption w/a
      test.
      
      Fixes: c674c5b9
      
       ("drm/i915/xehp: CCS should use RCS setup functions")
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: John Harrison <John.C.Harrison@Intel.com>
      Cc: Jason Ekstrand <jason@jlekstrand.net>
      Cc: "Michał Winiarski" <michal.winiarski@intel.com>
      Cc: Matthew Brost <matthew.brost@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
      Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
      Cc: Stuart Summers <stuart.summers@intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Ramalingam C <ramalingam.c@intel.com>
      Cc: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-3-John.C.Harrison@Intel.com
      c3bd49cd
    • John Harrison's avatar
      drm/i915/guc: Limit scheduling properties to avoid overflow · 568944af
      John Harrison authored
      
      
      GuC converts the pre-emption timeout and timeslice quantum values into
      clock ticks internally. That significantly reduces the point of 32bit
      overflow. On current platforms, worst case scenario is approximately
      110 seconds. Rather than allowing the user to set higher values and
      then get confused by early timeouts, add limits when setting these
      values.
      
      v2: Add helper functions for clamping (review feedback from Tvrtko).
      v3: Add a bunch of BUG_ON range checks in addition to the checks
      already in the clamping functions (Tvrtko)
      
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Acked-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221006213813.1563435-2-John.C.Harrison@Intel.com
      568944af
    • Andrzej Hajda's avatar
      drm/i915/gt: use intel_uncore_rmw when appropriate · c61aa740
      Andrzej Hajda authored
      
      
      This patch replaces all occurences of the form
      intel_uncore_write(reg, intel_uncore_read(reg) OP val)
      with intel_uncore_rmw.
      
      Signed-off-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221019143818.244339-2-andrzej.hajda@intel.com
      c61aa740
    • Andrzej Hajda's avatar
      drm/i915: use intel_uncore_rmw when appropriate · 5490c504
      Andrzej Hajda authored
      
      
      This patch replaces all occurences of the form
      intel_uncore_write(reg, intel_uncore_read(reg) OP val)
      with intel_uncore_rmw.
      
      Signed-off-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221019143818.244339-1-andrzej.hajda@intel.com
      5490c504
  4. Oct 21, 2022
    • Matt Roper's avatar
      drm/i915/xelpg: Fix write to MTL_MCR_SELECTOR · a47e8a46
      Matt Roper authored
      A misplaced closing parenthesis caused the groupid/instanceid values to
      be considered part of the ternary operator's condition instead of being
      OR'd into the resulting value.
      
      Fixes: f32898c9
      
       ("drm/i915/xelpg: Add multicast steering")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221019222437.3035182-1-matthew.d.roper@intel.com
      a47e8a46
    • Tvrtko Ursulin's avatar
      drm/i915/selftests: Stop using kthread_stop() · 6407cf53
      Tvrtko Ursulin authored
      Since a7c01fa9
      
       ("signal: break out of wait loops on kthread_stop()")
      kthread_stop() started asserting a pending signal which wreaks havoc with
      a few of our selftests. Mainly because they are not fully expecting to
      handle signals, but also cutting the intended test runtimes short due
      signal_pending() now returning true (via __igt_timeout), which therefore
      breaks both the patterns of:
      
        kthread_run()
        ..sleep for igt_timeout_ms to allow test to exercise stuff..
        kthread_stop()
      
      And check for errors recorded in the thread.
      
      And also:
      
          Main thread  |   Test thread
        ---------------+------------------------------
        kthread_run()  |
        kthread_stop() |  do stuff until __igt_timeout
      		 |  -- exits early due signal --
      
      Where this kthread_stop() was assume would have a "join" semantics, which
      it would have had if not the new signal assertion issue.
      
      To recap, threads are now likely to catch a previously impossible
      ERESTARTSYS or EINTR, marking the test as failed, or have a pointlessly
      short run time.
      
      To work around this start using kthread_work(er) API which provides
      an explicit way of waiting for threads to exit. And for cases where
      parent controls the test duration we add explicit signaling which threads
      will now use instead of relying on kthread_should_stop().
      
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221020130841.3845791-1-tvrtko.ursulin@linux.intel.com
      6407cf53
    • Ville Syrjälä's avatar
      drm/i915: s/HAS_BAR2_SMEM_STOLEN/HAS_LMEMBAR_SMEM_STOLEN/ · 03eababb
      Ville Syrjälä authored
      
      
      The fact that LMEMBAR is BAR2 should be of no real interest
      to anyone. So use the name of the BAR rather than its index.
      
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221005154159.18750-3-ville.syrjala@linux.intel.com
      Acked-by: default avatarMatthew Auld <matthew.auld@intel.com>
      03eababb
    • Ville Syrjälä's avatar
      drm/i915: Name our BARs based on the spec · 0492a34c
      Ville Syrjälä authored
      
      
      We use all kinds of weird names for our base address registers.
      Take the names from the spec and stick to them to avoid confusing
      everyone.
      
      The only exceptions are IOBAR and LMEMBAR since naming them
      IOBAR_BAR and LMEMBAR_BAR looks too funny, and yet I think
      that adding the _BAR to GTTMMADR & co. (which don't have one
      in the spec name) does make it more clear what they are.
      And IOBAR vs. GTTMMADR_BAR also looks a bit too inconsistent
      for my taste.
      
      v2: Fix gvt build
      v3: Add GEN2_IO_BAR for completeness
      
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221005195646.17201-1-ville.syrjala@linux.intel.com
      Acked-by: default avatarMatthew Auld <matthew.auld@intel.com>
      0492a34c
  5. Oct 20, 2022
  6. Oct 19, 2022