Received: by 10.223.185.116 with SMTP id b49csp328949wrg; Thu, 22 Feb 2018 22:47:00 -0800 (PST) X-Google-Smtp-Source: AH8x227CnbfmNdSrU7GFL1lYq/iARJrTMt2q48QkueH3npsLlznasxN3Ug9EJgYeimc3XArhVe/7 X-Received: by 10.99.145.199 with SMTP id l190mr585331pge.397.1519368420308; Thu, 22 Feb 2018 22:47:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519368420; cv=none; d=google.com; s=arc-20160816; b=eeqUfa+gVVlcp8xVNXqEcjL67HdzqprZidOpZIZvZ9RZiPTegkYrfOm9XNzLYpW/AJ Ugb5EbFtZZFOOkgXUNMgTJ+GQoXu5b6dNvZimkHWE/vQW16Xvizfz5ntWU+SE7GziMVf voXSlXSz+7w3hKhgrx28wAVI1oi3fkq9iJRT9kI1ljWGsYXHTGdauhMOZKiH3VEFGP4F JrCTr29fcUARyIQeNfxqCGuiZlrZbUDJuNDoD6C2aDn62NWBC4r8Wppj3KrPLxF4VMuN fkhO0kAl6YJNa6WXkmUzdp6pTnKEKLKfhuDPlzdpfgGzhj7M7R65A/mEqwh6sXmkQgjy o79Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=9IJ7/tFh/0sJOmRNcSXRdMIZn6MN/4BG5i392v1uCAE=; b=n7GAwIEvLFEra7USP6tLcYtPSRY95TqbZNwZMn/JCKD54jDMzRZuLQA8VtoALuv/4e eInKXNApzuPjNeF8nyd1RDJ5Nkcjzgo5wXEQ6ctwPlcqYqkd5PlXmGQ49KPzGH7IFMJi OtkcjWA18slQrJPlZ6zNai2HGKACDAw5AfyHFGGTsMjHb/EmpZo0GiQ73t/4NWXypHzU Omur1vmydGjfI5ecy/+4mWabu2w1X29HynFo3s4J+1dZQqTfLMF/IxMZ/fSEIxelBw2G 4W/KoVE0RFaDskzFPm519dmCsPxxSQohWTzLckiZU/Vdxl0QetBCxpXWlkc3XAH1B6J6 n0VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S+fWhB3R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y21si1334990pfk.28.2018.02.22.22.46.45; Thu, 22 Feb 2018 22:47:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S+fWhB3R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbeBWGqK (ORCPT + 99 others); Fri, 23 Feb 2018 01:46:10 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:43480 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943AbeBWGqI (ORCPT ); Fri, 23 Feb 2018 01:46:08 -0500 Received: by mail-lf0-f68.google.com with SMTP id q69so10885714lfi.10 for ; Thu, 22 Feb 2018 22:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=9IJ7/tFh/0sJOmRNcSXRdMIZn6MN/4BG5i392v1uCAE=; b=S+fWhB3ROr2qE8qA5uM0Eu8Tjg9MI/Ml7c7NUN2feE8PyaD8dRu/I2aYvF62Sd/ylP hk3e8lmV6S3QUTt/t6iCXSy/F4JJRIczkUNtxKHYj6sM12uElDBNx7xe/y9dP9QUqyM7 b3/Dc66l5C5b0f+m/7w5eh92NxJnuutEvUgMRLdk3/tnpv/iluwRLwFymHPd9uDuw/Rv yngQzH0MUQcleE3D8ZybCdXs38Mx+ex2dEc3dZyeU7oJ5xGu1C0Qakn+HurKEZnIuS26 Ww0EEniquUpD3BLx9ffuFUDo8ASisct2GcnLI8/SSVVwE6FTMATUKoaivikLdWfe9O2K 1Xyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9IJ7/tFh/0sJOmRNcSXRdMIZn6MN/4BG5i392v1uCAE=; b=uft7fk4wGIRIqU0QfbcoG0oIuPA7ZXHRW1CqLkAB+5XoZAnl2P8kdGO7+DueZqb7ge Ql1lqez6dLm+1svCnUphnI+MoN4Kn4mmOlV5FpObowXqMmx2N5ma9sHF4u8zD0Za0avE rJwfe0gzmgBozFb6jtoidgDym6a0/5y3+GmXgTlCAzim4RaouTWOvjdbfyXwwoWxu1mP 399EfWxmGxfCFM11DL6xAM/AgNltC9CIUWM5HUdM0Csebv3744gS0dfnFM+6+/VVuN4j peo7GVEazL7dSKIvWx38GL00pvAI11ERf4EhIj9kQnugFuhIRBpHLHtcNQPDCUJ40T9+ Bniw== X-Gm-Message-State: APf1xPAlqsvjBUCPqgYP/HS1XSYGWvkWD64z5g8dEHOCEOXknQhGxlMn uAzKY3Vw/4+6JTFkSy9gQlg= X-Received: by 10.46.65.211 with SMTP id d80mr471700ljf.109.1519368367204; Thu, 22 Feb 2018 22:46:07 -0800 (PST) Received: from [10.17.182.9] (ll-53.209.223.85.sovam.net.ua. [85.223.209.53]) by smtp.gmail.com with ESMTPSA id 5sm347631lfp.17.2018.02.22.22.46.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2018 22:46:06 -0800 (PST) Subject: Re: [PATCH 3/9] drm/xen-front: Read driver configuration from Xen store To: Boris Ostrovsky , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, daniel.vetter@intel.com, seanpaul@chromium.org, gustavo@padovan.org, jgross@suse.com, konrad.wilk@oracle.com Cc: Oleksandr Andrushchenko References: <1519200222-20623-1-git-send-email-andr2000@gmail.com> <1519200222-20623-4-git-send-email-andr2000@gmail.com> <74f01442-2e9e-5de7-3a8d-f5c12d9e8667@oracle.com> From: Oleksandr Andrushchenko Message-ID: <864fe8f3-99f7-1f63-4169-fc9e37c46c3f@gmail.com> Date: Fri, 23 Feb 2018 08:46:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <74f01442-2e9e-5de7-3a8d-f5c12d9e8667@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/23/2018 01:20 AM, Boris Ostrovsky wrote: > On 02/21/2018 03:03 AM, Oleksandr Andrushchenko wrote: >> + >> +static int cfg_connector(struct xen_drm_front_info *front_info, >> + struct xen_drm_front_cfg_connector *connector, >> + const char *path, int index) >> +{ >> + char *connector_path; >> + >> + connector_path = devm_kasprintf(&front_info->xb_dev->dev, >> + GFP_KERNEL, "%s/%d", path, index); >> + if (!connector_path) >> + return -ENOMEM; >> + >> + connector->xenstore_path = connector_path; >> + if (xenbus_scanf(XBT_NIL, connector_path, XENDISPL_FIELD_RESOLUTION, >> + "%d" XENDISPL_RESOLUTION_SEPARATOR "%d", >> + &connector->width, &connector->height) < 0) { >> + /* either no entry configured or wrong resolution set */ >> + connector->width = 0; >> + connector->height = 0; > Do you also need to set connector->xenstore_path to NULL? Or maybe just > set it after xenbus_scanf() call. Will move it down the code, after "if", thank you > -boris > > >