[Intel-gfx] [PATCH] uxa: Default to using TILING_X for pixmaps.
Marc Deop i ArgemÃ
damnshock at gmail.com
Thu Mar 25 10:23:21 CET 2010
On Tuesday March 23 2010 18:51:23 Chris Wilson wrote:
> src/i830_uxa.c | 21 +++++++++++++++------
> 1 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/src/i830_uxa.c b/src/i830_uxa.c
> index fec5378..ded931d 100644
> --- a/src/i830_uxa.c
> +++ b/src/i830_uxa.c
> @@ -135,8 +135,16 @@ i830_uxa_pixmap_compute_size(PixmapPtr pixmap,
> pitch_align = intel->accel_pixmap_pitch_alignment;
> size = ROUND_TO((w * pixmap->drawable.bitsPerPixel + 7) /
> 8, pitch_align) * ALIGN (h, 2);
> - if (size < 4096)
> + if (size <= 4096) {
> *tiling = I915_TILING_NONE;
> + } else if (!IS_I965G(intel)) {
> + /* Older hardware requires massive fences to be pot
> + * size aligned with a minimum of 1 MiB, so
> + * causes massive overallocation for small
> textures. + */
> + if (size <= 1024*1024/2)
> + *tiling = I915_TILING_NONE;
> + }
> }
>
> repeat:
> @@ -863,12 +871,13 @@ i830_uxa_create_pixmap(ScreenPtr screen, int w, int
> h, int depth, return NullPixmap;
> }
>
> - if (usage == INTEL_CREATE_PIXMAP_TILING_X)
> - priv->tiling = I915_TILING_X;
> - else if (usage == INTEL_CREATE_PIXMAP_TILING_Y)
> + /* Always attempt to tile, compute_size() will remove the
> + * tiling for pixmaps that are either too large or too
> small + * to be effectively tiled.
> + */
> + priv->tiling = I915_TILING_X;
> + if (usage == INTEL_CREATE_PIXMAP_TILING_Y)
> priv->tiling = I915_TILING_Y;
> - else
> - priv->tiling = I915_TILING_NONE;
>
> size = i830_uxa_pixmap_compute_size(pixmap, w, h,
> &priv->tiling,
> &stride);
I'm sorry to bother you developers but I'm trying to apply this patch and do
some testing with no success.
I'm failing to apply the patch getting this output:
patching file src/i830_uxa.c
Hunk #1 FAILED at 135.
Hunk #2 FAILED at 863.
Am I doing something wrong? May I get some help? If someone is kind enough to
help, I could get into the IRC channels if needed.
Thanks in advance for your time
Damnshock
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
More information about the Intel-gfx
mailing list