Received: by 10.223.185.116 with SMTP id b49csp2505wrg; Thu, 22 Feb 2018 15:21:00 -0800 (PST) X-Google-Smtp-Source: AH8x224Zcm1mjmjc22OcA9ZxaMpL93nO0qcq1e+bxZ58kVo+VTHjNOwplu1mTen1BgLSE9NB5jm9 X-Received: by 10.99.155.1 with SMTP id r1mr7100837pgd.422.1519341660184; Thu, 22 Feb 2018 15:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519341660; cv=none; d=google.com; s=arc-20160816; b=eusHpUK+7kskgErs1g0i/kfvcoFfdkDRL7hOyU1uigYnY92KyihGE16oHRIi1vN9b1 ElH4ZxftmVT0oEdsjLRRxkfYJX3wNC4GcNUXDeRdp3YRHS8J6AqElABWSusad4whXJBM GlvVE1/B7lOY2E7WHX4Hf7Oav2WSTKi78SOxl//CD71N+wg2SQVTELzqsy0ZOD/OZO5I d/bLUw5BQr3QA2YzGNCWTfeSu8w6vu5des7Yu45rbR3uPk5tcl7VVPNn+FhRC9V5kX80 clJ3per170BQYPkA1/EyXMs9+HHAh/+tosqNgdb2pPpn1UwXF7sjgxj8jtuTJTQASorG lSkg== 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=4yxn9iJNFIjBtxuBZhaLhJwwLgc43eRZ6S81AJW3OcQ=; b=br/onAMEwelVLImTcAg846O8sJ6C2VVUey4GpruyvOu3luh8wDylyQpO/y+lKbpPnH /cb83s4o7eXoPyP8MIwPvNjSqwirjYfQrtw0awdWeCvb/tix/hXdLVZHTgJxh6GGYMQT 0k2rSK92KG/YNUg997GiNwCTjNOSdgmMmsZ6B7UCQz8mRB6Jf6BStn+zAE1C7GZZvLDT fTJu9s+lbECTpHDbrNqUKHriq3EdXfFHShXCbFdTCxxkXdAGtKdzY//gTzSXbyGWtYNw WImqqenrX7YxdLNfQUsONnARdnRQ89j5P/IqPNfvH4lO2HeNCi3hd9CXOmIAJTOk/EdK 4CRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=S4xcpKQR; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si727517plx.791.2018.02.22.15.20.43; Thu, 22 Feb 2018 15:21: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=@oracle.com header.s=corp-2017-10-26 header.b=S4xcpKQR; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751586AbeBVXT4 (ORCPT + 99 others); Thu, 22 Feb 2018 18:19:56 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:46112 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbeBVXTz (ORCPT ); Thu, 22 Feb 2018 18:19:55 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1MNHIIk157323; Thu, 22 Feb 2018 23:19:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=4yxn9iJNFIjBtxuBZhaLhJwwLgc43eRZ6S81AJW3OcQ=; b=S4xcpKQRut1mk6qjrYUb7IyXwJa9+JT5hLGBX0JU+DD9JMxlCmN+BuWsKKNL+s/xl8N3 5coLwPqY1+y5SV2AP3NK83VB0h8VdnAZsXJuj/GfQznDobcqdprulAon9ob/ITxo3TxR sUotFTADob3rLrKjLRseeX9DkyYngfP0HaCsXhhR4p8O0fSRRVYhIN9r5vpjvyAiKZSL 4cv/SGyOP9bRvhyZmtCZA6EwGCUffcieuhBx14buRw7BFy9WYXAgwlEe8SpP4C0irMey zrlwfkYtYtLtrUHU+0A/wkrrGGpGmQ1KBkW/eTE1spbw8IgVUwaAHGst0Tjjp7p/E7cp rw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2ga77j03j8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Feb 2018 23:19:41 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1MNJeAn004265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Feb 2018 23:19:40 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1MNJdeV002351; Thu, 22 Feb 2018 23:19:39 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com (/10.152.32.65) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Feb 2018 15:19:39 -0800 Subject: Re: [PATCH 3/9] drm/xen-front: Read driver configuration from Xen store To: Oleksandr Andrushchenko , 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> From: Boris Ostrovsky Message-ID: <74f01442-2e9e-5de7-3a8d-f5c12d9e8667@oracle.com> Date: Thu, 22 Feb 2018 18:20:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1519200222-20623-4-git-send-email-andr2000@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8812 signatures=668677 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802220290 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -boris