From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Buddenhagen Subject: Re: AMD GPU new API for new module Date: Fri, 10 Oct 2014 04:25:13 +0200 Message-ID: <20141010022509.GA13466@alien.local> References: <20141008160026.GA7643@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by gabe.freedesktop.org (Postfix) with ESMTP id 47AA86E195 for ; Wed, 15 Oct 2014 07:48:50 -0700 (PDT) Received: from sky.local ([92.195.13.22]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MZ7bs-1XsmPE3YzM-00Kv7r for ; Wed, 15 Oct 2014 16:48:48 +0200 Received: from 192.168.1.6 (ident=unknown) by sky.local with smtp (masqmail 0.2.30) id 1XcPrN-0bj-00 for ; Fri, 10 Oct 2014 04:23:13 +0200 Content-Disposition: inline In-Reply-To: <20141008160026.GA7643@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hi, On Wed, Oct 08, 2014 at 12:00:27PM -0400, Jerome Glisse wrote: [...] > And now all ioctl go through this single entry point : > > int radeon_ioctl_stub(int ioctl, void *data, ...) > { > struct radeon_ioctl *rio = data; > > return rdispatch_ioctls[rio->version][ioctl](data, ...); > } I advise against this: it's essentially implementing IOCTLs on top of an IOCTL... It doesn't really reduce the maintenance burden: just moves it from the standard IOCTL dispatching to a custom mechanism; while adding extra complexity, and making the interface more opaque. (Think strace, or Valgrind.) -antrik-