From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH i-g-t] kms_cursor_crc: Move igt_pipe_crc_{new, free} to init Date: Thu, 22 May 2014 22:23:49 +0200 Message-ID: <20140522202349.GE14357@phenom.ffwll.local> References: <1400777259-20091-1-git-send-email-matthew.d.roper@intel.com> <20140522170109.GY27580@intel.com> <20140522170637.GM31484@intel.com> <20140522171258.GB27580@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com [74.125.83.50]) by gabe.freedesktop.org (Postfix) with ESMTP id 6BEBF6ECF0 for ; Thu, 22 May 2014 13:23:53 -0700 (PDT) Received: by mail-ee0-f50.google.com with SMTP id e51so3009737eek.37 for ; Thu, 22 May 2014 13:23:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140522171258.GB27580@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, May 22, 2014 at 08:12:58PM +0300, Ville Syrj=E4l=E4 wrote: > On Thu, May 22, 2014 at 10:06:37AM -0700, Matt Roper wrote: > > On Thu, May 22, 2014 at 08:01:09PM +0300, Ville Syrj=E4l=E4 wrote: > > > On Thu, May 22, 2014 at 09:47:39AM -0700, Matt Roper wrote: > > > > If a subtest fails, cleanup_crtc() never gets called. Currently th= at > > > > also causes igt_pipe_crc_free() to never be called, leading all > > > > subsequent subtests to also fail with -EBUSY at igt_pipe_crc_new(). > > > > Move the calls to igt_pipe_crc_{new,free} into igt_main so that > > > > we don't need to worry about closing and reopening the CRC > > > > filedescriptor for each subtest. > > > = > > > IIRC we can't call them at init because when you call igt_pipe_crc_ne= w() > > > the pipe->port mapping has to be properly set up so that the auto crc > > > source will know what to do. > > > = > > > The subtest failure case is the reason why at the start of every subt= est > > > we call igt_pipe_crc_free() before calling igt_pipe_crc_new(). Are you > > > saying that's not working as intended? > > = > > Right, you're working on a fresh test_data structure for each call of > > run_test(), so you've already lost the test_data->pipe_crc pointer that > > you're trying to check for NULL there. > > = > > I guess the right fix is to move the pipe_crc pointer up into data_t > > rather than test_data_t? > = > I guess just kill test_data_t and shovel everything into data_t. I don't > remember why the test_data_t came to be there, but I don't think it > serves any purpose anymore. Also just run igts with piglit. That runs every subtest separately which helps a lot for such issues. Running all the tests is kinda just the quick&hacky versions if you're wreaking havoc with a single tests. Otoh for that I just run one subtest through the cmdline switch. So not sure how much we should bother here really ... -Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch