Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp794645iog; Mon, 13 Jun 2022 13:09:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0ff3JJKccqy1dY0pG74We79WLE0Bb2bp3bjDSib1eqdtxizBOEz+/f4WKzgu4+EeYN2hk X-Received: by 2002:a63:d458:0:b0:3fe:6905:fad1 with SMTP id i24-20020a63d458000000b003fe6905fad1mr1171340pgj.144.1655150958153; Mon, 13 Jun 2022 13:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655150958; cv=none; d=google.com; s=arc-20160816; b=hvE1FbZxM1gGQrE3vgOReUuffJYd5CnfLegDPqHBYAFi8us0iqt++qtm4eeSduKHzW /PGM4N/KMXLqDi6Z9gaKbm4BFGtqv0xxj/b95XG/BKfuDv6G14SocwXtFWQWSZkAYY+V 9gVoG08AN1QpSAsFQHW88FVJCe0z8l4n8kTO8Y0q6Cr/GbiX0gAJc1stRG/cPJNpnWAN J2egPj6IZf3yqdn4EF3m5Qrb+DI4MR54H6NHBZsPnPnZtruV4PL2Zf8fYOkaasbWVhz3 vJAnbTPt+wXIYACYP036Lyyhuc81AmPsAwIX2aMlaWwAnbSZCOV6h4+VejviAgbblLLx vtTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:organization:in-reply-to:subject:cc:to :from:dkim-signature; bh=k8URHLOEOKeun8cBY7rnie03KCqBGqoI+s45JgxjAN8=; b=PqCZEr9KwKE3uCwZM9iikDN08+v1Y8cD9PlqYXDGTc6yZylDGSKX6rMgJ60Eg6Ylt1 mxrkJXx8hJq1pO5KytuhAbK5IKYbooOJHAbzsL/qyvZN5yxfgd9Y1boMDDPuJ5GXg/X7 Yr08yuMdCbQX5m03QfIyk7Etr61kG4InM8PKHCXKh1PjhQLeBphbjA1/TZK9KNF6fvQ+ s5Gw2mJG5plDtadOmjSrFOZPzbslHNm6ix+vvQzuGvWjtsM3BYK2zYaVNz5XjcxfckbR v4jpu3GzXwzYnHVNF28kaTVgVE7xrdI73CEZtH4OQN7jcqZn8j1Tl59D0rHyNzbvrt9V 0LCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lEcahN0N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x7-20020a63f707000000b003fd41012238si10005779pgh.800.2022.06.13.13.09.06; Mon, 13 Jun 2022 13:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lEcahN0N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346951AbiFMUAP (ORCPT + 99 others); Mon, 13 Jun 2022 16:00:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240533AbiFMUAA (ORCPT ); Mon, 13 Jun 2022 16:00:00 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B5CA4A91A for ; Mon, 13 Jun 2022 11:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655145090; x=1686681090; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=PA+RJfWey2I595Esrv3rrJOEx2AlZ/fX4Ur/wV2CUNU=; b=lEcahN0NJVkan/AVzP3uM7ASNV7XX4bOBgXu+u6j1pBZvkIQNNKjAete Izx2IE+OPQv/aFbca9YoO6fzt0+rD1+IrAwrDIsOVv68+X4Oj3BDpK50I zX1IiPkEKOgPqcHZ+KbID70XElMqa56dyQz7vuEFI7gStFY6nsTX3wSJA VYVSlyiMx2LOhmbIM5qWXD7s637uX0+C8MCE9z/SrzWwDHD3m9MdPl/oq xU88HAIr0UUSfvRRBSf7EjHTMhs8OZwSDAkMX/4stqEBqbXDdsmSq6HSp w99l9qudjcsJp4jP1ysu7BZNcwDovY4CsK3WZSSW/Nh2d7nqI4lVjY84H g==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="258204200" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="258204200" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 11:31:30 -0700 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="639878137" Received: from njascanu-mobl.ger.corp.intel.com (HELO localhost) ([10.252.47.149]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 11:31:26 -0700 From: Jani Nikula To: =?utf-8?Q?Jos=C3=A9_Exp=C3=B3sito?= , javierm@redhat.com Cc: davidgow@google.com, dlatypov@google.com, tzimmermann@suse.de, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, =?utf-8?Q?Jos?= =?utf-8?Q?=C3=A9_Exp=C3=B3sito?= Subject: Re: [PATCH v3 1/3] drm/rect: Add DRM_RECT_INIT() macro In-Reply-To: <20220613171738.111013-2-jose.exposito89@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220613171738.111013-1-jose.exposito89@gmail.com> <20220613171738.111013-2-jose.exposito89@gmail.com> Date: Mon, 13 Jun 2022 21:31:24 +0300 Message-ID: <87bkuwza83.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Jun 2022, Jos=C3=A9 Exp=C3=B3sito wr= ote: > Add a helper macro to initialize a rectangle from x, y, width and > height information. > > Signed-off-by: Jos=C3=A9 Exp=C3=B3sito Reviewed-by: Jani Nikula > --- > include/drm/drm_rect.h | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h > index 6f6e19bd4dac..e8d94fca2703 100644 > --- a/include/drm/drm_rect.h > +++ b/include/drm/drm_rect.h > @@ -47,6 +47,22 @@ struct drm_rect { > int x1, y1, x2, y2; > }; >=20=20 > +/** > + * DRM_RECT_INIT - initialize a rectangle from x/y/w/h > + * @x: x coordinate > + * @y: y coordinate > + * @w: width > + * @h: height > + * > + * RETURNS: > + * A new rectangle of the specified size. > + */ > +#define DRM_RECT_INIT(x, y, w, h) ((struct drm_rect){ \ > + .x1 =3D (x), \ > + .y1 =3D (y), \ > + .x2 =3D (x) + (w), \ > + .y2 =3D (y) + (h) }) > + > /** > * DRM_RECT_FMT - printf string for &struct drm_rect > */ --=20 Jani Nikula, Intel Open Source Graphics Center