From patchwork Tue Oct 25 12:06:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Praveen Paneri X-Patchwork-Id: 9399045 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B2FBE60231 for ; Thu, 27 Oct 2016 08:31:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E0D02A079 for ; Thu, 27 Oct 2016 08:31:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 803AC2A0BB; Thu, 27 Oct 2016 08:31:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 056822A079 for ; Thu, 27 Oct 2016 08:31:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 279756E9FE; Thu, 27 Oct 2016 08:31:17 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 046CE6E143 for ; Tue, 25 Oct 2016 12:09:24 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 25 Oct 2016 05:09:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,545,1473145200"; d="scan'208";a="893719056" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 25 Oct 2016 05:09:24 -0700 Received: from bgsmsx105.gar.corp.intel.com (10.223.43.197) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 25 Oct 2016 05:09:23 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.210]) by BGSMSX105.gar.corp.intel.com ([169.254.3.189]) with mapi id 14.03.0248.002; Tue, 25 Oct 2016 17:36:28 +0530 From: "Paneri, Praveen" To: Tvrtko Ursulin , "intel-gfx@lists.freedesktop.org" Thread-Topic: [Intel-gfx] [PATCH 1/4] igt_fb: Add Y-tiling support Thread-Index: AQHSLhbnwXwessNxUEaQvHDPeoEMOaC4dPwAgACezMA= Date: Tue, 25 Oct 2016 12:06:27 +0000 Message-ID: References: <1477328158-10817-1-git-send-email-praveen.paneri@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWYwMTBmODItNTQ2Yy00NmQwLTg2OTYtM2NjZWU3NTRmN2NiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImVwejR1eFR5UlpOYnZKM0U2NTluT0I2QUdFbmRRWmZWVHd6QVdSdkM0Sms9In0= x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH 1/4] igt_fb: Add Y-tiling support X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Hi Tvrtko, Along with this change I made following change in the kernel side. I was not sure if this is a hack of a legitimate change. Could you please give me a pointer about how to move fwd from here? Without this all Y-tiling tests would fail. Regards, Praveen -----Original Message----- From: Tvrtko Ursulin [mailto:tvrtko.ursulin@linux.intel.com] Sent: Tuesday, October 25, 2016 1:36 PM To: Paneri, Praveen ; intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 1/4] igt_fb: Add Y-tiling support On 24/10/2016 17:55, Praveen Paneri wrote: > This adds Y-tiling check in igt_create_fb_with_bo_size as now we > should also be able to create Y-tiled FBs. > > Signed-off-by: Praveen Paneri > --- > lib/igt_fb.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 47472f4..bf1d372 100644 > --- a/lib/igt_fb.c > +++ b/lib/igt_fb.c > @@ -608,7 +608,8 @@ igt_create_fb_with_bo_size(int fd, int width, int height, > __func__, fb->gem_handle, fb->stride); > > if (tiling != LOCAL_DRM_FORMAT_MOD_NONE && > - tiling != LOCAL_I915_FORMAT_MOD_X_TILED) { > + tiling != LOCAL_I915_FORMAT_MOD_X_TILED && > + tiling != LOCAL_I915_FORMAT_MOD_Y_TILED) { > do_or_die(__kms_addfb(fd, fb->gem_handle, width, height, > fb->stride, format, tiling, > LOCAL_DRM_MODE_FB_MODIFIERS, &fb_id)); > This works now? Ie. doesn't hit "No Y Tiling for legacy addfb" error in the driver? Regards, Tvrtko --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -15406,8 +15406,7 @@ static int intel_framebuffer_init(struct drm_device *dev, if (obj->tiling_mode == I915_TILING_X) mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED; else if (obj->tiling_mode == I915_TILING_Y) { - DRM_DEBUG("No Y tiling for legacy addfb\n"); - return -EINVAL; + mode_cmd->modifier[0] = I915_FORMAT_MOD_Y_TILED; } }