All of lore.kernel.org
 help / color / mirror / Atom feed
From: venkata.sai.patnana@intel.com
To: igt-dev@lists.freedesktop.org
Cc: "Kunal Joshi" <kunal1.joshi@intel.com>,
	"Juha-Pekka Heikkilä" <juha-pekka.heikkila@intel.com>
Subject: [igt-dev] [PATCH i-g-t v2 11/17] tests/kms_big_fb: Optimize setup_fb function
Date: Fri, 11 Jun 2021 15:29:15 +0530	[thread overview]
Message-ID: <20210611095916.7158-1-venkata.sai.patnana@intel.com> (raw)
In-Reply-To: <20210611052005.303-11-venkata.sai.patnana@intel.com>

From: Kunal Joshi <kunal1.joshi@intel.com>

libcario takes a lot of time converting 32bpp fb to 64bpp fb,
When fb memory is given by kernel its zeroed, here two different color fbs,
black and green are created hence if kernel give zeroed fbs there's
possibility to skip zeroing it again thus saving some time

Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/kms_big_fb.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index 89ea0f23e2..3e19450a42 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -115,12 +115,15 @@ static void setup_fb(data_t *data, struct igt_fb *newfb, uint32_t width,
 		f.offsets[n] = newfb->offsets[n];
 	}
 
-	cr = igt_get_cairo_ctx(data->drm_fd, newfb);
-	igt_paint_color(cr, 0, 0, newfb->width, newfb->height,
-			data->planeclearrgb[0],
-			data->planeclearrgb[1],
-			data->planeclearrgb[2]);
-	igt_put_cairo_ctx(cr);
+       if (data->planeclearrgb[0] != 0.0 || data->planeclearrgb[1] != 0.0 ||
+           data->planeclearrgb[2] != 0.0) {
+               cr = igt_get_cairo_ctx(data->drm_fd, newfb);
+               igt_paint_color(cr, 0, 0, newfb->width, newfb->height,
+                               data->planeclearrgb[0],
+                               data->planeclearrgb[1],
+                               data->planeclearrgb[2]);
+               igt_put_cairo_ctx(cr);
+       }
 
 	igt_assert(drmIoctl(data->drm_fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == 0);
 	newfb->fb_id = f.fb_id;
-- 
2.25.1

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

  reply	other threads:[~2021-06-11 10:09 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  5:19 [igt-dev] [PATCH i-g-t 01/17] tests/kms_dither: New IGT to validate crtc Dithering venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 02/17] tests/kms_dither: Validate dither after CC blocks venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 03/17] tests/device_reset: Unload snd driver before i915 unbind venkata.sai.patnana
2021-06-11 15:49   ` Kai Vehmanen
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 04/17] tests/core_hotunplug: " venkata.sai.patnana
2021-06-11 15:50   ` Kai Vehmanen
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 05/17] tests/kms_force_connector_basic: Skip prune stale mode venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 06/17] tests/kms: Create buffer object from LMEM for discrete venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 07/17] tests/kms_addfb_basic: Add invalid buffer object test " venkata.sai.patnana
2021-06-11 11:40   ` Petri Latvala
2021-06-11 11:49   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 12:09     ` Petri Latvala
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 08/17] tests/kms_dp_dsc: Read the debugfs only once venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 09/17] tests/kms_big_fb: Add max HW stride length tests venkata.sai.patnana
2021-06-15  6:00   ` Shankar, Uma
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 10/17] tests/kms_big_fb: Add max hw stride lenght async flip test venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 11/17] tests/kms_big_fb: Optimize setup_fb function venkata.sai.patnana
2021-06-11  9:59   ` venkata.sai.patnana [this message]
2021-06-11 11:32     ` [igt-dev] [PATCH i-g-t v2 " Karthik B S
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 12/17] tests/kms_dp_dsc: Add a subtest to force DSC output BPP venkata.sai.patnana
2021-06-15 15:25   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 13/17] lib: Add helper functions to read/write dsc debugfs venkata.sai.patnana
2021-06-15  9:13   ` Petri Latvala
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 14/17] tests/kms_dp_dsc: Assign all related data members together venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 15/17] tests/kms_dp_dsc: Use helper functions to read/write dsc debugfs venkata.sai.patnana
2021-06-15  9:15   ` Petri Latvala
2021-06-15 15:25   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 16/17] tests/kms_invalid_dotclock: Modify the test for bigjoiner venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 17/17] tests/kms_cdclk : Add test to validate cdclk crawling venkata.sai.patnana
2021-06-11  9:59   ` venkata.sai.patnana
2021-06-11 11:49     ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 14:11       ` [igt-dev] [PATCH i-g-t v3 " venkata.sai.patnana
2021-06-11  6:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering Patchwork
2021-06-11  9:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-11 12:17   ` Petri Latvala
2021-06-11 10:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev3) Patchwork
2021-06-11 12:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-06-11 13:01 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev5) Patchwork
2021-06-11 15:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-11 15:23 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev6) Patchwork
2021-06-15  5:54 ` [igt-dev] [PATCH i-g-t 01/17] tests/kms_dither: New IGT to validate crtc Dithering Shankar, Uma
2021-06-15  5:58   ` Modem, Bhanuprakash
2021-06-15  6:11     ` Shankar, Uma
2021-06-15  9:04       ` Jani Nikula
2021-06-15 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev8) Patchwork
2021-06-16  0:10 ` [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=20210611095916.7158-1-venkata.sai.patnana@intel.com \
    --to=venkata.sai.patnana@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juha-pekka.heikkila@intel.com \
    --cc=kunal1.joshi@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.