From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 06/15] drm/i915: dev_priv cleanup in i915_gem_tiling.c
Date: Wed, 16 Nov 2016 08:55:36 +0000 [thread overview]
Message-ID: <1479286545-15020-7-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1479286545-15020-1-git-send-email-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
And a little bit of cascaded function prototype changes.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/i915_gem_tiling.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
index 251d51b01174..c85e7b06bdba 100644
--- a/drivers/gpu/drm/i915/i915_gem_tiling.c
+++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
@@ -60,9 +60,9 @@
/* Check pitch constriants for all chips & tiling formats */
static bool
-i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
+i915_tiling_ok(struct drm_i915_private *dev_priv,
+ int stride, int size, int tiling_mode)
{
- struct drm_i915_private *dev_priv = to_i915(dev);
int tile_width;
/* Linear is always fine */
@@ -81,10 +81,10 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
/* check maximum stride & object size */
/* i965+ stores the end address of the gtt mapping in the fence
* reg, so dont bother to check the size */
- if (INTEL_INFO(dev)->gen >= 7) {
+ if (INTEL_GEN(dev_priv) >= 7) {
if (stride / 128 > GEN7_FENCE_MAX_PITCH_VAL)
return false;
- } else if (INTEL_INFO(dev)->gen >= 4) {
+ } else if (INTEL_GEN(dev_priv) >= 4) {
if (stride / 128 > I965_FENCE_MAX_PITCH_VAL)
return false;
} else {
@@ -104,7 +104,7 @@ i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)
return false;
/* 965+ just needs multiples of tile width */
- if (INTEL_INFO(dev)->gen >= 4) {
+ if (INTEL_GEN(dev_priv) >= 4) {
if (stride & (tile_width - 1))
return false;
return true;
@@ -199,7 +199,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
if (!obj)
return -ENOENT;
- if (!i915_tiling_ok(dev,
+ if (!i915_tiling_ok(dev_priv,
args->stride, obj->base.size, args->tiling_mode)) {
i915_gem_object_put(obj);
return -EINVAL;
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-11-16 8:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 8:55 [PATCH 00/15] Remove __I915__ magic macro Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 01/15] drm/i915: dev_priv and a small cascade of cleanups in i915_gem.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 02/15] drm/i915: Use dev_priv in INTEL_INFO in i915_gem_execbuffer.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 03/15] drm/i915: Use dev_priv in INTEL_INFO in i915_gem_fence_reg.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 04/15] drm/i915: dev_priv cleanup in i915_gem_gtt.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 05/15] drm/i915: dev_priv cleanup in i915_gem_stolen.c Tvrtko Ursulin
2016-11-16 8:55 ` Tvrtko Ursulin [this message]
2016-11-16 8:55 ` [PATCH 07/15] drm/i915: dev_priv cleanup in i915_gpu_error.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 08/15] drm/i915: dev_priv cleanup in i915_irq.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 09/15] drm/i915: dev_priv cleanup in i915_suspend.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 10/15] drm/i915: Assorted INTEL_INFO(dev) cleanups Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 11/15] drm/i915: dev_priv cleanup in intel_dp.c Tvrtko Ursulin
2016-11-17 14:21 ` Maarten Lankhorst
2016-11-16 8:55 ` [PATCH 12/15] drm/i915: dev_priv cleanup in intel_pm.c Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 13/15] drm/i915: dev_priv cleanup in intel_display.c Tvrtko Ursulin
2016-11-16 12:32 ` [PATCH v2 " Tvrtko Ursulin
2016-11-17 14:20 ` Maarten Lankhorst
2016-11-16 8:55 ` [PATCH 14/15] drm/i915: Fix for_each_pipe argument in vlv_display_power_well_init Tvrtko Ursulin
2016-11-16 8:55 ` [PATCH 15/15] drm/i915: Remove __I915__ magic macro Tvrtko Ursulin
2016-11-16 9:05 ` [PATCH 00/15] " Chris Wilson
2016-11-16 9:11 ` Chris Wilson
2016-11-16 9:52 ` Jani Nikula
2016-11-16 9:16 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-16 9:56 ` Tvrtko Ursulin
2016-11-17 14:06 ` Tvrtko Ursulin
2016-11-16 14:16 ` ✗ Fi.CI.BAT: warning for Remove __I915__ magic macro (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=1479286545-15020-7-git-send-email-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--cc=Intel-gfx@lists.freedesktop.org \
/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;
as well as URLs for NNTP newsgroup(s).