All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: michel.thierry@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: drm/i915/gen8: page directories rework allocation
Date: Thu, 30 Apr 2015 13:47:45 +0300	[thread overview]
Message-ID: <20150430104745.GA25329@mwanda> (raw)

Hi Michel,

The patch 69876bed7e00: "drm/i915/gen8: page directories rework
allocation" from Apr 8, 2015, has the following issue:

	drivers/gpu/drm/i915/i915_gem_gtt.c:760
	warn: too many zeroes

drivers/gpu/drm/i915/i915_gem_gtt.c
   746  static int gen8_ppgtt_alloc_page_directories(struct i915_hw_ppgtt *ppgtt,
   747                                       struct i915_page_directory_pointer *pdp,
   748                                       uint64_t start,
   749                                       uint64_t length,
   750                                       unsigned long *new_pds)
   751  {
   752          struct drm_device *dev = ppgtt->base.dev;
   753          struct i915_page_directory *pd;
   754          uint64_t temp;
   755          uint32_t pdpe;
   756  
   757          WARN_ON(!bitmap_empty(new_pds, GEN8_LEGACY_PDPES));
   758  
   759          /* FIXME: PPGTT container_of won't work for 64b */
   760          WARN_ON((start + length) > 0x800000000ULL);
                                                     ^
This last zero was not intended.

   761  
   762          gen8_for_each_pdpe(pd, pdp, start, length, temp, pdpe) {
   763                  if (pd)
   764                          continue;
   765  
   766                  pd = alloc_pd_single(dev);
   767                  if (IS_ERR(pd))
   768                          goto unwind_out;
   769  
   770                  gen8_initialize_pd(&ppgtt->base, pd);
   771                  pdp->page_directory[pdpe] = pd;
   772                  set_bit(pdpe, new_pds);
   773          }
   774  
   775          return 0;
   776  
   777  unwind_out:
   778          for_each_set_bit(pdpe, new_pds, GEN8_LEGACY_PDPES)
   779                  unmap_and_free_pd(pdp->page_directory[pdpe], dev);
   780  
   781          return -ENOMEM;
   782  }


regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2015-04-30 10:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 10:47 Dan Carpenter [this message]
2015-04-30 12:27 ` drm/i915/gen8: page directories rework allocation Dave Gordon
2015-04-30 13:59 ` [PATCH] drm/i915: Fix 32b overflow check in gen8_ppgtt_alloc_page_directories Michel Thierry
2015-04-30 14:22   ` Ville Syrjälä
2015-04-30 14:33     ` Michel Thierry
2015-04-30 14:53       ` Dave Gordon
2015-04-30 14:56         ` Michel Thierry
2015-04-30 14:58         ` Ville Syrjälä
2015-05-02  0:38   ` shuang.he
2015-05-04 12:57   ` David Weinehall
2015-04-30 15:06 ` [PATCH v2] " Michel Thierry
2015-05-02  4:26   ` shuang.he
2015-05-06 10:14   ` Daniel Vetter

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=20150430104745.GA25329@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michel.thierry@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.