Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbdFZGRe (ORCPT ); Mon, 26 Jun 2017 02:17:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35604 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbdFZGRZ (ORCPT ); Mon, 26 Jun 2017 02:17:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 23BA781229 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 23BA781229 Message-ID: <1498457848.20591.4.camel@redhat.com> Subject: Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf operations From: Gerd Hoffmann To: Alex Williamson Cc: "Zhang, Tina" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Kirti Wankhede , "Chen, Xiaoguang" , "intel-gvt-dev@lists.freedesktop.org" , "Lv, Zhiyuan" , "Wang, Zhi A" , "Wang, Zhenyu Z" Date: Mon, 26 Jun 2017 08:17:28 +0200 In-Reply-To: <20170623111554.3a98f626@w520.home> References: <1497513611-2814-1-git-send-email-xiaoguang.chen@intel.com> <1497513611-2814-6-git-send-email-xiaoguang.chen@intel.com> <1497542438.29252.1.camel@redhat.com> <20170615143833.7526351b@w520.home> <24c4880b-24f5-ea07-834c-c77d3e895c78@nvidia.com> <1497854312.4207.4.camel@redhat.com> <20170619085530.1f5e46dc@w520.home> <237F54289DF84E4997F34151298ABEBC7C56EBE0@SHSMSX101.ccr.corp.intel.com> <1497956256.16795.7.camel@redhat.com> <20170620090004.44ac7fbc@w520.home> <237F54289DF84E4997F34151298ABEBC7C56F3DC@SHSMSX101.ccr.corp.intel.com> <20170620172204.09405cf4@w520.home> <237F54289DF84E4997F34151298ABEBC7C56F843@SHSMSX101.ccr.corp.intel.com> <1498043011.5802.5.camel@redhat.com> <20170621125938.1a92abda@w520.home> <1498120215.25651.5.camel@redhat.com> <20170622125458.01c953ab@w520.home> <1498202819.24807.3.camel@redhat.com> <20170623111554.3a98f626@w520.home> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 26 Jun 2017 06:17:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 469 Lines: 17 Hi, > > So maybe a "enum plane_state" (instead of "bool is_enabled")?  So > > we > > can clearly disturgish ENABLED, DISABLED, NOT_SUPPORTED cases? > > What's the difference between NOT_SUPPORTED and -ENOTTY on the ioctl? > Perhaps a bit in a flags field could specify EN/DIS-ABLED and leave > room for things we're forgetting. So throw error in the NOT_SUPPORTED case, otherwise set/clear a PLANE_ENABLED bit in flags? Yep, that will work too. cheers, Gerd