Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1145522imm; Fri, 27 Jul 2018 11:55:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc+sMMlPHY2DmJuiVbRrOLYOHmkLOXrlVlnMEzzkMoHjXBFj1yeH/POvlZYD1vzqEYWy6T6 X-Received: by 2002:a17:902:163:: with SMTP id 90-v6mr7090636plb.322.1532717724178; Fri, 27 Jul 2018 11:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532717724; cv=none; d=google.com; s=arc-20160816; b=Tjg+zxxUtK3wPPo0cQk/0qWAb9LFm5V+VJql/2sfhhKlcBGoC1jjRps9Pj8j+HMh7J dlJPJ/aKHWFNpdg7rw67bFDW/Pm4++Sc18LqmbU6TlHTivHw+inqXVqXsJMhahBAzKkw f5+moJ1ALCzgctn7USVo/ZSaC55DCfyh5skDFDGCO9uOQZ0LXFv3ZbN3Sg1b5OM59qb6 GyOgSiNbLWW3dbEyG+3q7Rz+oYbsz28VBfBibhD5saCRYkJOe3WExq3ywMKYMK2+aOhq Y2cMiFa/KUBCpiawsmvfrxBbrVpVs4LchSwOdCioKeL3XwktgP2sZxMIu1DyPdG2N5dQ I4iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=HAOb9QPYQOdzxO7JPZjJxces3g/2uWoQp39Gm4Jkvzk=; b=F+6b9mCW+4RQnz5+G0Ym7SeGXfPA2yn4rJjwF39YR7IVXCVJjp1NLfi3v+Xbfk3YZ8 GE5/KGSyRmVEOrOYjMlCox79e0bNMYStJHNxjUUbFVtDC2XI/WfAJ8FQp1Eic0uZftRm OGD/e6nWUMnK9/nbuvmD7rBhCi9GEnMycB0ea8FXOzAe2cTSwMp79OL3nh/59VKWA569 A5bwWN2dgO7bHbho114AGqpj6XRw6Qbxm8x1UNKLfiTyKwSV2c+DROB33rdP2XwTzCIV QxvoBgKiB+Vo1t8cSaLvupJsTRzI3BSR+DuJUpRKmdOT/LgMSxYiAGmnbDiNrU+/XVNq zIFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GzQWlNEa; 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 x3-v6si4773356pfj.289.2018.07.27.11.55.08; Fri, 27 Jul 2018 11:55:24 -0700 (PDT) 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=GzQWlNEa; 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 S2389131AbeG0URd (ORCPT + 99 others); Fri, 27 Jul 2018 16:17:33 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42548 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389006AbeG0URc (ORCPT ); Fri, 27 Jul 2018 16:17:32 -0400 Received: by mail-pg1-f196.google.com with SMTP id y4-v6so3727416pgp.9; Fri, 27 Jul 2018 11:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HAOb9QPYQOdzxO7JPZjJxces3g/2uWoQp39Gm4Jkvzk=; b=GzQWlNEa4gwcl7oWetoyhD/0FuTuUeJLIbbE0iL87060ZGbBqtnS3E+vdfJT2DxoG3 Y6m7JADw3iqxjquZkYvv6WwCbRX2Z8BBKuesDV5x7Ui0PWyi/mWgIXUKHtj7VltQ0KX9 8vA3d1bGvlg5R3YtuWfA28VpGGCbI3qO720Fbk3/njFf82B5hNThTVVhO0ytSMYPamgs +s6AT3BnaDDRinhfcY/9xY4Zq0ltFPtHHgNFl/e0Vjsgu6xLD6plnuxV26Ak535xkMaF g8FiQHG+6PXKswtu4rCl7GagisBV7by2O4isOj8drSZGnRTiVJOSvTcXMYnNk4RJqZ/h bYxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HAOb9QPYQOdzxO7JPZjJxces3g/2uWoQp39Gm4Jkvzk=; b=fS3NFG1AP7/kR06ceG5MYX+OZX8dnvxSFfk5DuKMSNzc0HeunR9JS+xKAnBvi2KZef podyOu4L/6ZQfle7iq3eyXKa82LZhaEb7PE8KNFy+9PN8TD1vPSs6o9+KSl+Vvi1xKMy 9eJDupwsFNf2gmTxrl6UFIVXd+1p5FWfJwAz5l6HoKSTciOBY0uB8L+rleGTLzSHHN8W H5Nmr7obfP0MdDIWPY2JKZJbHnhyRhZpTQHTRgcTqR9PIhsBKH131EVvxouUOnKxxY/l zGSoeIel0LFSTCAjAUUO71h/3u062428MdTbUZ34BroCb0foORDU+PDLCTJq11qAy2qR Hk0g== X-Gm-Message-State: AOUpUlHj9bfAaiM5imKlMUq762K2pzeaNuAzCE3eKb2VmIJv0cdI9ssB 43SsxZREVuZ6/X5NT+xB0vg= X-Received: by 2002:a63:2106:: with SMTP id h6-v6mr7175006pgh.161.1532717661182; Fri, 27 Jul 2018 11:54:21 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id g5-v6sm5509528pgn.73.2018.07.27.11.54.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Jul 2018 11:54:19 -0700 (PDT) Date: Fri, 27 Jul 2018 11:54:18 -0700 From: Dmitry Torokhov To: Nick Dyer Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Chris Healy , Nikita Yushchenko , Lucas Stach , Nick Dyer Subject: Re: [PATCH v1 01/10] Input: atmel_mxt_ts - only use first T9 instance Message-ID: <20180727185418.GG72640@dtor-ws> References: <20180720215122.23558-1-nick@shmanahar.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180720215122.23558-1-nick@shmanahar.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 20, 2018 at 10:51:13PM +0100, Nick Dyer wrote: > From: Nick Dyer > > The driver only registers one input device, which uses the screen > parameters from the first T9 instance. The first T63 instance also uses > those parameters. > > It is incorrect to send input reports from the second instances of these > objects if they are enabled: the input scaling will be wrong and the > positions will be mashed together. > > This also causes problems on Android if the number of slots exceeds 32. > > In the future, this could be handled by looking for enabled touch object > instances and creating an input device for each one. > > Signed-off-by: Nick Dyer > Acked-by: Benson Leung > Acked-by: Yufeng Shen > --- OK, I adjusted patch #7 to use kmemdup_nul() as we discussed, and skipped #9, applied the rest. Thanks! > drivers/input/touchscreen/atmel_mxt_ts.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c > index 54fe190fd4bc..48c5ccab00a0 100644 > --- a/drivers/input/touchscreen/atmel_mxt_ts.c > +++ b/drivers/input/touchscreen/atmel_mxt_ts.c > @@ -1658,10 +1658,11 @@ static int mxt_parse_object_table(struct mxt_data *data, > break; > case MXT_TOUCH_MULTI_T9: > data->multitouch = MXT_TOUCH_MULTI_T9; > + /* Only handle messages from first T9 instance */ > data->T9_reportid_min = min_id; > - data->T9_reportid_max = max_id; > - data->num_touchids = object->num_report_ids > - * mxt_obj_instances(object); > + data->T9_reportid_max = min_id + > + object->num_report_ids - 1; > + data->num_touchids = object->num_report_ids; > break; > case MXT_SPT_MESSAGECOUNT_T44: > data->T44_address = object->start_address; > -- > 2.17.1 > -- Dmitry