Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1243712iol; Sun, 12 Jun 2022 10:03:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0y970xweouIDtRp+Rzdt1nPc/lj6bsEmSEj5nz5MEjMgfUBHlFa+sW9nHKrEAYiWc98Lt X-Received: by 2002:a17:906:b898:b0:711:ca46:24ec with SMTP id hb24-20020a170906b89800b00711ca4624ecmr33985795ejb.111.1655053396110; Sun, 12 Jun 2022 10:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655053396; cv=none; d=google.com; s=arc-20160816; b=MR7airDi7FDxEwKd7wciE95B0rbcbcRuxLqFkf+TLknghe14kLaFtxYAOOPdcQ6T8+ uZ7efGXVx3wQFO7cq8pPduzEr1C6ODpDeDGDzLaXjwHDIoYPA7y1CYGcplFHloq5YSMP 7GLdF2tWy8PvfdUMEGpl+K7kCcdC8hxKWLp3eJ84GLKWwmrxRxk37BKatTBeuidm9ghS LKd+FIv9JGT17mBgmuapHouRhcUIDYDkQAg/INULU6nOCatx8sfEMOLd5aH0LBLSDJon DAmtsSJ727D1urYebxfzvb7F4otvxb8V2wWBXtpXM8fOmFS0UHyrWAIAIc1DcubyigXc 8Bhg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6LL9w+d+H88J/0VBgbeKOwTbMY4B/jVYAAXA85+Hav4=; b=JPKZLG9XA81flnFek1PNWY0p5TVcnwqCZ2p8ZjNnSSa/B9X25fOvVG+RWLm+PE+J4A ofUApGK5/EO2IBcmZygEJjp+96iOiTmB99kkt7kVqzFOvd7ORiJqCb2iJiZTUiWxdpKA e4swwKX83PZT2/82YUUbtgmrs7R0qzKw0kFVi+nm5Bcl+ScepClqrHAlJsEdhcnQaYZg 8oeOARYsF3IMaGv/BtosL+o5TYkaML5LDJHffNM9IOnTzwTAxFi/3rYmMzU8ukZChWes Xs/aU5wcih/DsIHk04i+Qo4DJrWUGGY1BO9PqO4cLNs+ICH0/Nc3u3HCx9zjp9GOHf3F J5iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gl5639X+; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a05640240c200b0042bd7234fb9si6799383edb.27.2022.06.12.10.02.51; Sun, 12 Jun 2022 10:03:16 -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=@gmail.com header.s=20210112 header.b=gl5639X+; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232045AbiFLQND (ORCPT + 99 others); Sun, 12 Jun 2022 12:13:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbiFLQNB (ORCPT ); Sun, 12 Jun 2022 12:13:01 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4FC94A3FE for ; Sun, 12 Jun 2022 09:13:00 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id u8so4371742wrm.13 for ; Sun, 12 Jun 2022 09:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6LL9w+d+H88J/0VBgbeKOwTbMY4B/jVYAAXA85+Hav4=; b=gl5639X+UtUz4/8ZKGB9pGoMNC/i69RQhkFXX4sV2KPNty/Uj+gZYC8+yAvfPMVjQ4 flVMMv+wYJbeaU7Sucs4xH8SmGJRWX0lF6xMBjkdVbS5yqJn7s/sMYsbfglp/lMlsz8D iTSE1qWoCj8OwrfSvDiEIVikBaPyfgc1DrTe19Tsw01bK9szh4Y2w95yBh5FMQUUOMDS RgmFC8+X3mA1VuNAzM2LOyEU+r13r8GMEdzdexYcFcREk/5tjrVhzsznJqAVgQpbiuyA 6P74+Xzhlx1dpmYB/9ewkmxFOu9uUepV6KNlfCgjqVLMpzYGgKZmteKKMT8HEQjDkI0A dTbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6LL9w+d+H88J/0VBgbeKOwTbMY4B/jVYAAXA85+Hav4=; b=64X3NY+2GZjAsV+AxRh35O0NUcl4BTkvH8RP6Hi7t0v1A3+2oVoDhWpCxSADLExg+C APONFkud+ajyUv1dJyt0quGqrVMAENlh6s9hd0zaNsPBmS5eWQXfBzdiawztS3r8Oh1f LHYCrukZB6VmkEKBhtHDTCs9WLxCOKIuDz2+1yurt6W34dYFHxrDDRwbHeDCHULUuKYL Ix+77NJFJnC7sKwLInpbOMlygvv+Lf38GPHbrc1rh1jox2mTPYXt205Dj/wBwf4I0w/R njbkezaAowjUeGd0ijcgglUQXqUc4tmORdSd/FvAmTe8v4yEwvqp8nUs5rnLFtj+pQ4w PXgw== X-Gm-Message-State: AOAM533qjzW2NdPCbpNngkEn0VDz3vo+BNbKHoevWAKZPftXUdvkUQyS 3IaIaxwcN6D5waRduecoZSo= X-Received: by 2002:a5d:5903:0:b0:210:316f:7f40 with SMTP id v3-20020a5d5903000000b00210316f7f40mr53339486wrd.624.1655050379282; Sun, 12 Jun 2022 09:12:59 -0700 (PDT) Received: from localhost.localdomain ([94.73.36.128]) by smtp.gmail.com with ESMTPSA id y8-20020a5d6208000000b0020d0f111241sm6015925wru.24.2022.06.12.09.12.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jun 2022 09:12:59 -0700 (PDT) From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= To: 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=C3=A9=20Exp=C3=B3sito?= Subject: [PATCH v2 1/3] drm/rect: Add DRM_RECT_INIT() macro Date: Sun, 12 Jun 2022 18:12:46 +0200 Message-Id: <20220612161248.271590-2-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220612161248.271590-1-jose.exposito89@gmail.com> References: <20220612161248.271590-1-jose.exposito89@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 Add a helper macro to initialize a rectangle from x, y, width and height information. Signed-off-by: José Expósito --- include/drm/drm_rect.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/drm/drm_rect.h b/include/drm/drm_rect.h index 6f6e19bd4dac..945696323c69 100644 --- a/include/drm/drm_rect.h +++ b/include/drm/drm_rect.h @@ -47,6 +47,18 @@ struct drm_rect { int x1, y1, x2, y2; }; +/** + * 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) { (x), (y), (x) + (w), (y) + (h) } + /** * DRM_RECT_FMT - printf string for &struct drm_rect */ -- 2.25.1