From patchwork Fri Jun 26 13:06:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaaira Gupta X-Patchwork-Id: 209263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14F92C433DF for ; Fri, 26 Jun 2020 13:07:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E3AD32081A for ; Fri, 26 Jun 2020 13:07:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=es-iitr-ac-in.20150623.gappssmtp.com header.i=@es-iitr-ac-in.20150623.gappssmtp.com header.b="F4KzxXab" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727773AbgFZNHK (ORCPT ); Fri, 26 Jun 2020 09:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbgFZNHK (ORCPT ); Fri, 26 Jun 2020 09:07:10 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C9FC08C5DC for ; Fri, 26 Jun 2020 06:07:10 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id s14so4261486plq.6 for ; Fri, 26 Jun 2020 06:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=YTKb0UeG+qPRJPpdcm4YXWRuqmqvPg+QAyQ4w0Tgt64=; b=F4KzxXabIaQ/V+cRgDzKaNDAHMGi0nD4P6kwkSSe/9BfI9D3an7T61LJCpDDCJ6KH9 U3JxENO3EP4tm1LbD1KMX2Oq9vmu0HHu3blm9GE0m4UWlcM/sYA2JTWoD9s7VXVKM39o 9l6R2SP2pDdy37jRUmnkcy/7/xzfOpPbA8TrAvI1x7+AeJUhpwGtElhYXJO4V4pAmxf2 aeCxhWL0w0W6+ezj7EZ5BVuFYw5Xx2fYUP+wsXzhYj0CmnhEVmchyC7/l2ZVUqYDaODM CJTEytHQk6bqY1nFYjqRJTh18mN8QoOvgwO2ijKjCKy32cRhaLk5/5bTxoLn8o8BdGGW wxOA== 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; bh=YTKb0UeG+qPRJPpdcm4YXWRuqmqvPg+QAyQ4w0Tgt64=; b=AO31T6kNsoekiO1YzuVG+bc3aR3ipBaD5jmGbaP3in5BzhWrPl5y6Df5wHOfzP66Q4 OC08zwmjfTT3fIaAuAukxhhwxyIyXAo5zxiv9wfZmDZ7vSw+YYrygS2pR5FX7+R0B1iq LfRV+RBbad+F0/+bRylnPcDBEFAUR7aX7M/OUnQbCe9qFTZIOFDRbsLFjOrRip97NA1Y cesfhhnlgUyN4UfGRuJ+svrWE231B1USModQnRFdfmUl8/vA4LYuqBWv0lA3vCKObQ+z kvjjQbFumPWTFeEZ1r/6XY+C214zsMDVpWxcLFRIgKD6I56T524RtMNp5uaPtyzcpj6X q9ww== X-Gm-Message-State: AOAM530mqzj/uKAXsH62wdxzTucxiqNnf/GzakC2BMVMbqc/K9MZ9Hum TuMDbMrOt0//axGt+ObT2HK7kw== X-Google-Smtp-Source: ABdhPJywYnP0rtMaKUvXL/cX9EN2jqFl/u2bRsECiEP/djeYd9TA3DIdIZ7ycPgO8qDzO1DPJpO5nQ== X-Received: by 2002:a17:90a:191b:: with SMTP id 27mr3541616pjg.158.1593176829537; Fri, 26 Jun 2020 06:07:09 -0700 (PDT) Received: from kaaira-HP-Pavilion-Notebook ([103.113.213.178]) by smtp.gmail.com with ESMTPSA id x77sm26840289pfc.4.2020.06.26.06.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 06:07:09 -0700 (PDT) From: Kaaira Gupta To: Helen Koike , Shuah Khan , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Kieran Bingham , hverkuil@xs4all.nl Cc: Kaaira Gupta Subject: [PATCH v7 0/3] media: Add colors' order and other info over test image Date: Fri, 26 Jun 2020 18:36:57 +0530 Message-Id: <20200626130700.2453-1-kgupta@es.iitr.ac.in> X-Mailer: git-send-email 2.17.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This patchset aims to add a method to display the correct order of colors for a test image generated. It does so by adding a function which returns a string of correct order of the colors for a test pattern. It then adds a control in vimc which displays the string over test image. It also displays some other information like saturation, hue, contrast brightness and time since the stream started over test image generated by vimc. Changes since v6: In patch 3: - Use switch case instead of if() - reorder declarartions. Changes since v5: In patch 2: - Add missing EXPORT_SYMBOL_GPL() In patch 3: - Renamed varaibles. - use u64 instead of int for getting current time in nanoseconds. - Use enum instead of numbers to describe the state of osd_mode control in code. Changes since v4: - Add another patch which changes char argument to const char in function tpg_gen_text() - Return const char * from function tpg_g_color_order() in patch 2 In 3rd patch: - Check font in probe() instead of s_stream() - Use dev_err instead of pr_err - Fix errors in commit message. - Base VIMC_CID_SHOW_INFO on VIVID_CID_OSD_TEXT_MODE Changes since v3: In 1st patch: -Improved formatting of returned string. In 2nd patch: - Add CID prefix in control name and change it to a more generic name. - Rename bool variable to a generic name. - Disable text rendering instead of stopping stream if no font found. - Display more info like VIVID in VIMC. Changes since v2: In 1st patch: - Create a 'define' to prevent repetition of the common color sequence string. - Use 'fallthrough' on case statement to prevent repetition of code. Changes since v1: - Divided the patch into two patches. - Returned NULL for patterns whose color order cannot be defined. (Reported-by: kernel test robot ) - Made separate switch cases for separate test patterns (Reported-by: kernel test robot ) - Renamed variables from camelcase to use '_' - prefixed 'media' to the patches. Kaaira Gupta (3): media: tpg: change char argument to const char media: tpg: Add function to return colors' order of test image media: vimc: Add a control to display info on test image drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 40 +++++++++-- drivers/media/test-drivers/vimc/Kconfig | 2 + drivers/media/test-drivers/vimc/vimc-common.h | 1 + drivers/media/test-drivers/vimc/vimc-core.c | 10 +++ drivers/media/test-drivers/vimc/vimc-sensor.c | 70 +++++++++++++++++++ include/media/tpg/v4l2-tpg.h | 3 +- 6 files changed, 118 insertions(+), 8 deletions(-)