public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>,
	igt-dev@lists.freedesktop.org
Cc: ville.syrjala@intel.com, martin.peres@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t v1] lib/igt_fb: Remove unused variable buf.
Date: Fri, 26 Oct 2018 13:25:09 +0200	[thread overview]
Message-ID: <6f83ac6b-e0ae-32e0-42b4-5b9ad637786b@linux.intel.com> (raw)
In-Reply-To: <20181026104427.11112-1-stanislav.lisovskiy@intel.com>

Op 26-10-18 om 12:44 schreef Stanislav Lisovskiy:
> Despite the comment temporary buf is not
> used anywhere in convert_nv12_to_rgb24,
> so it has to be either removed or used instead
> of cvt->src.ptr.
> Currently removing it as other functions seem
> not to use it either, to make the code more consistent.
>
> Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
> ---
>  lib/igt_fb.c | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 4700b152..d92769a9 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -1528,16 +1528,9 @@ static void convert_nv12_to_rgb24(struct fb_convert *cvt)
>  	uint8_t *rgb24 = cvt->dst.ptr;
>  	unsigned int rgb24_stride = cvt->dst.fb->strides[0];
>  	unsigned int planar_stride = cvt->src.fb->strides[0];
> -	uint8_t *buf = malloc(cvt->src.fb->size);
>  	struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(cvt->src.fb->color_encoding,
>  						    cvt->src.fb->color_range);
>  
> -	/*
> -	 * Reading from the BO is awfully slow because of lack of read caching,
> -	 * it's faster to copy the whole BO to a temporary buffer and convert
> -	 * from there.
> -	 */
> -	igt_memcpy_from_wc(buf, cvt->src.ptr, cvt->src.fb->size);
>  	y = cvt->src.ptr + cvt->src.fb->offsets[0];
>  	uv = cvt->src.ptr + cvt->src.fb->offsets[1];
assign y and uv to &buf[...->offsets[bla]]? Otherwise nice catch, this is destroying performance. :)

~Maarten
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-10-26 11:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 10:44 [igt-dev] [PATCH i-g-t v1] lib/igt_fb: Remove unused variable buf Stanislav Lisovskiy
2018-10-26 11:25 ` Maarten Lankhorst [this message]
2018-10-26 11:43 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-10-26 11:55 ` Patchwork
2018-10-26 16:48 ` [igt-dev] ✓ Fi.CI.IGT: " 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=6f83ac6b-e0ae-32e0-42b4-5b9ad637786b@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=martin.peres@intel.com \
    --cc=stanislav.lisovskiy@intel.com \
    --cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox