From patchwork Thu Aug 20 03:40:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 248002 Delivered-To: patches@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1001863ils; Wed, 19 Aug 2020 20:41:04 -0700 (PDT) X-Received: by 2002:a63:5012:: with SMTP id e18mr1094633pgb.169.1597894863975; Wed, 19 Aug 2020 20:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597894863; cv=none; d=google.com; s=arc-20160816; b=l3T1OdTPQVhkrvfyCfOF3DHkMWhergbc+sXGR3HJ1VSYHsa45HJjD8WxLLIfZ2m8FX 7yNZDlmbfMOrFse2GbK6yBQizgcl84rLPDkn6tCkbqExiYDO9mibVr+QxiwSV9kSJ7Qg ODXb/9ISJXD3P5nHXiWDETjZX+h6blsINq0Cenekelo2vLvHa/yQN/1hIjyBGMDAtS4P 6wPLq4XJSXvRjqbCPwdVnYq/wc8IuE7gXKD7jbPSHcJc/bz14lbsbPjErlI9ympgDnhc 8bElk+nb13bAwzjNlYF/fP1ZHS5F/u9DNxPfqc4LHE1dzr+6lySIF2QYnyp5nMYIDpI1 +12w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=J8YVoHBmhP7CwdTtvl1VuAAC1kupCb0CJ2Q7eWIL2Qg=; b=As6+o3dwijT6y8YxqAlvwT+8kxCkzS767NouL9aTLVson4hpHsuOmdFvg7K8k+wMK4 jJtfrU8ROOTd12jm6G3k58i9WC5Rp9GnDnVQOW9nUyoSOXmxZh6tNjg+JB9sp1vKtkzN X1onHGGUXhZLfRFy529tZbws5VO+1/NoIY8Lmff3zu4SJVkesU9ZXtMWlM31yMQp6bNs ZIcQeaL8J46ICrRYQmPx/CR0E8/Ja34EYAoDRQjSBu/6yGvtVnXbsh0TUozH7eepBY3g Jq/2m4wAUP3G1puv2foDRjZduepq+rxfDdEZCViPTEuWrdl32ypEmSsEyB/KgDhiwaBp Q8Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AU6pOAFy; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v13sor418928pfm.26.2020.08.19.20.41.03 for (Google Transport Security); Wed, 19 Aug 2020 20:41:03 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AU6pOAFy; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J8YVoHBmhP7CwdTtvl1VuAAC1kupCb0CJ2Q7eWIL2Qg=; b=AU6pOAFyZUuERVPlUGgQ633WDZ41yAxyiPrfn91iU3wpnAPmf83Atkl0hdBSgRmmQS ZRjcfQxA+fFqXOfJY/CcH1Ey1UJnYB374q6Zg6zrY+vQldYy40Sq3WpW19jFKM8kncFR sICeqEb93KmCfIlNkBuLhO8EXviVMyxL/narlfzvxjt2d31fXtUTgkxALNvyVPFSkDHY OarfKqjNid+4wytiNixG0wOlTER+obDITTobrWnFtWAUxICEccsVp6YtHtGlzaclXw0p fCUB5NbFnDne0+bgV9UZe9umxJtdTCRMjusN2+Cd3dsrweZQhQZ3M+LzPKkPw0aZKOzB M9DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=J8YVoHBmhP7CwdTtvl1VuAAC1kupCb0CJ2Q7eWIL2Qg=; b=e+X1U7alXvD9MrY1bEJw+Zc4xLEkK9Ha8ZtlVbPEnb63VX90gwBTvgJquVymXxnWrX pUOLYrz4c0s/U+JaVotmMcUH47YqLYeAUVAoMOePEHKermkQGICXLEIIu2wuA4SQmC14 LNpRUnbqEdcAqdA742dba1KgYXJiyP0IwSVQb2FoJXMbjHUd/aoQr6x7Ypgr8F3nPK7d T9hcSFboHLkBO8dkG0nS68V4iTbFUCaQ5NBnkoj88fAnnqxolLXOmLUpXnBA3W94q3dZ cjx0j8jH+4g0s27pnm24dQ5UV84cRxMNW06B+IJtuCn1hu0+6ZJQXOI0r7Z0EiqAvgsj tBSQ== X-Gm-Message-State: AOAM533QAaTGAbyDSe0aGov2fu477lb/FMsy/7JynEj0w2/F+x276bZ8 oqWEg8kmId853IWz525hjDEolNmF X-Google-Smtp-Source: ABdhPJyhB2GNDaHZkcuGGQCn+7emHrUxCM2nzwttMrYziKfs722BrdQHw/nqTvpSU6n6JeP5+jhfIw== X-Received: by 2002:a62:5cc4:: with SMTP id q187mr799823pfb.95.1597894863592; Wed, 19 Aug 2020 20:41:03 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y126sm786477pfy.138.2020.08.19.20.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 20:41:02 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Mauro Carvalho Chehab , Greg Kroah-Hartman , Manivannan Sadhasivam , dri-devel , Liwei Cai , Xinliang Liu , Laurent Pinchart , Sam Ravnborg , Sumit Semwal , Chen Feng Subject: [PATCH 2/3] drm: kirin9xxx: Add additional color formats Date: Thu, 20 Aug 2020 03:40:59 +0000 Message-Id: <20200820034100.128062-1-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200820033939.127932-1-john.stultz@linaro.org> References: <20200820033939.127932-1-john.stultz@linaro.org> This is against Mauro's tree here: https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/master/ Add support for two color formats (ARGB and ABGR) needed for use with drm_hwcomposer and AOSP. NOTE: I see Red/Blue swapped colors with this (and yes I did try the obvious swap of formats here, to no luck :), so I need to dig more on whats different from the other driver on this. But with these formats supported drm_hwcomposer no longer crashes Cc: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman Cc: Manivannan Sadhasivam Cc: dri-devel Cc: Liwei Cai Cc: Xinliang Liu Cc: Laurent Pinchart Cc: Sam Ravnborg Cc: Sumit Semwal Cc: Chen Feng Signed-off-by: John Stultz --- drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c index e3a1f85bdbd2..f2e99c766927 100644 --- a/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c +++ b/drivers/staging/hikey9xx/gpu/kirin9xx_drm_dss.c @@ -55,14 +55,15 @@ static const struct dss_format dss_formats[] = { { DRM_FORMAT_XBGR8888, HISI_FB_PIXEL_FORMAT_BGRX_8888 }, { DRM_FORMAT_RGBA8888, HISI_FB_PIXEL_FORMAT_RGBA_8888 }, { DRM_FORMAT_BGRA8888, HISI_FB_PIXEL_FORMAT_BGRA_8888 }, - /*{ DRM_FORMAT_ARGB8888, },*/ - /*{ DRM_FORMAT_ABGR8888, },*/ + { DRM_FORMAT_ARGB8888, HISI_FB_PIXEL_FORMAT_RGBA_8888 }, + { DRM_FORMAT_ABGR8888, HISI_FB_PIXEL_FORMAT_BGRA_8888 }, }; static const u32 channel_formats1[] = { DRM_FORMAT_RGB565, DRM_FORMAT_BGR565, DRM_FORMAT_XRGB8888, DRM_FORMAT_XBGR8888, - DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRA8888 + DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRA8888, + DRM_FORMAT_ARGB8888, DRM_FORMAT_ABGR8888, }; u32 dss_get_channel_formats(u8 ch, const u32 **formats)