From: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
To: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Cc: "Kuoppala, Mika" <mika.kuoppala@intel.com>
Subject: Re: [PATCH 5/9] drm/i915: Remove unneeded check on execlist ringbuf alloc
Date: Thu, 16 Apr 2015 00:00:04 +0000 [thread overview]
Message-ID: <1429142468.26721.56.camel@intel.com> (raw)
In-Reply-To: <1429141956-2338-6-git-send-email-rodrigo.vivi@intel.com>
On Wed, 2015-04-15 at 16:52 -0700, Rodrigo Vivi wrote:
> From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>
> We just allocated the intel_ringbuffer with kzalloc. There
> is no chance of the ringbuf->obj being other than NULL
> so remove the redudant check.
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 29 +++++++++++++----------------
> 1 file changed, 13 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 4373754..dcfd975 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1879,25 +1879,22 @@ int intel_lr_context_deferred_create(struct intel_context *ctx,
> ringbuf->last_retired_head = -1;
> intel_ring_update_space(ringbuf);
>
> - if (ringbuf->obj == NULL) {
I was going to suggest a warn here at least...
> - ret = intel_alloc_ringbuffer_obj(dev, ringbuf);
> + ret = intel_alloc_ringbuffer_obj(dev, ringbuf);
> + if (ret) {
> + DRM_DEBUG_DRIVER(
> + "Failed to allocate ringbuffer obj %s: %d\n",
> + ring->name, ret);
but it will probably end op here so nevermind...
> + goto error_free_rbuf;
> + }
> +
> + if (is_global_default_ctx) {
> + ret = intel_pin_and_map_ringbuffer_obj(dev, ringbuf);
> if (ret) {
> - DRM_DEBUG_DRIVER(
> - "Failed to allocate ringbuffer obj %s: %d\n",
> + DRM_ERROR(
> + "Failed to pin and map ringbuffer %s: %d\n",
> ring->name, ret);
> - goto error_free_rbuf;
> + goto error_destroy_rbuf;
> }
> -
> - if (is_global_default_ctx) {
> - ret = intel_pin_and_map_ringbuffer_obj(dev, ringbuf);
> - if (ret) {
> - DRM_ERROR(
> - "Failed to pin and map ringbuffer %s: %d\n",
> - ring->name, ret);
> - goto error_destroy_rbuf;
> - }
> - }
> -
> }
>
> ret = populate_lr_context(ctx, ctx_obj, ring, ringbuf);
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-04-16 0:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 23:52 [PATCH 0/9] drm-intel-collector - update Rodrigo Vivi
2015-04-15 23:52 ` [PATCH 1/9] drm/i915: Remove pinned check from madvise_ioctl Rodrigo Vivi
2015-04-15 23:52 ` [PATCH 2/9] drm/i915/vlv: check port in infoframe_enabled v2 Rodrigo Vivi
2015-04-16 9:10 ` Daniel Vetter
2015-04-15 23:52 ` [PATCH 3/9] drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg Rodrigo Vivi
2015-04-16 6:45 ` Imre Deak
2015-04-16 9:08 ` Daniel Vetter
2015-04-23 21:27 ` Jani Nikula
2015-04-15 23:52 ` [PATCH 4/9] drm/i915: Remove unused head member in request struct Rodrigo Vivi
2015-04-15 23:59 ` Vivi, Rodrigo
2015-04-16 7:35 ` Chris Wilson
2015-04-15 23:52 ` [PATCH 5/9] drm/i915: Remove unneeded check on execlist ringbuf alloc Rodrigo Vivi
2015-04-16 0:00 ` Vivi, Rodrigo [this message]
2015-04-15 23:52 ` [PATCH 6/9] drm/i915: Support for higher DSI clk Rodrigo Vivi
2015-04-15 23:52 ` [PATCH 7/9] drm/i915: Changes required to enable DSI Video Mode on CHT Rodrigo Vivi
2015-04-15 23:52 ` [PATCH 8/9] drm/i915: Remove duplicated intel_fbc_update calls Rodrigo Vivi
2015-04-15 23:52 ` [PATCH 9/9] drm/i915: Attach a PSR property on eDP Rodrigo Vivi
2015-04-16 18:44 ` shuang.he
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=1429142468.26721.56.camel@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@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.