| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 and |
|---|
| 6 | | - * only version 2 as published by the Free Software Foundation. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 | | - * GNU General Public License for more details. |
|---|
| 12 | 4 | */ |
|---|
| 13 | 5 | |
|---|
| 14 | 6 | #include "mdp5_kms.h" |
|---|
| .. | .. |
|---|
| 261 | 253 | u32 blend_cfg; |
|---|
| 262 | 254 | struct mdp5_hw_mixer *mixer = pipeline->mixer; |
|---|
| 263 | 255 | |
|---|
| 264 | | - if (unlikely(WARN_ON(!mixer))) { |
|---|
| 265 | | - dev_err(ctl_mgr->dev->dev, "CTL %d cannot find LM", |
|---|
| 256 | + if (WARN_ON(!mixer)) { |
|---|
| 257 | + DRM_DEV_ERROR(ctl_mgr->dev->dev, "CTL %d cannot find LM", |
|---|
| 266 | 258 | ctl->id); |
|---|
| 267 | 259 | return -EINVAL; |
|---|
| 268 | 260 | } |
|---|
| 269 | 261 | |
|---|
| 270 | 262 | if (pipeline->r_mixer) { |
|---|
| 271 | | - dev_err(ctl_mgr->dev->dev, "unsupported configuration"); |
|---|
| 263 | + DRM_DEV_ERROR(ctl_mgr->dev->dev, "unsupported configuration"); |
|---|
| 272 | 264 | return -EINVAL; |
|---|
| 273 | 265 | } |
|---|
| 274 | 266 | |
|---|
| .. | .. |
|---|
| 604 | 596 | mdp5_write(mdp5_kms, REG_MDP5_SPARE_0, 0); |
|---|
| 605 | 597 | return 0; |
|---|
| 606 | 598 | } else if ((ctlx->pair != NULL) || (ctly->pair != NULL)) { |
|---|
| 607 | | - dev_err(ctl_mgr->dev->dev, "CTLs already paired\n"); |
|---|
| 599 | + DRM_DEV_ERROR(ctl_mgr->dev->dev, "CTLs already paired\n"); |
|---|
| 608 | 600 | return -EINVAL; |
|---|
| 609 | 601 | } else if (!(ctlx->status & ctly->status & CTL_STAT_BOOKED)) { |
|---|
| 610 | | - dev_err(ctl_mgr->dev->dev, "Only pair booked CTLs\n"); |
|---|
| 602 | + DRM_DEV_ERROR(ctl_mgr->dev->dev, "Only pair booked CTLs\n"); |
|---|
| 611 | 603 | return -EINVAL; |
|---|
| 612 | 604 | } |
|---|
| 613 | 605 | |
|---|
| .. | .. |
|---|
| 652 | 644 | if ((ctl_mgr->ctls[c].status & checkm) == match) |
|---|
| 653 | 645 | goto found; |
|---|
| 654 | 646 | |
|---|
| 655 | | - dev_err(ctl_mgr->dev->dev, "No more CTL available!"); |
|---|
| 647 | + DRM_DEV_ERROR(ctl_mgr->dev->dev, "No more CTL available!"); |
|---|
| 656 | 648 | goto unlock; |
|---|
| 657 | 649 | |
|---|
| 658 | 650 | found: |
|---|
| .. | .. |
|---|
| 698 | 690 | |
|---|
| 699 | 691 | ctl_mgr = kzalloc(sizeof(*ctl_mgr), GFP_KERNEL); |
|---|
| 700 | 692 | if (!ctl_mgr) { |
|---|
| 701 | | - dev_err(dev->dev, "failed to allocate CTL manager\n"); |
|---|
| 693 | + DRM_DEV_ERROR(dev->dev, "failed to allocate CTL manager\n"); |
|---|
| 702 | 694 | ret = -ENOMEM; |
|---|
| 703 | 695 | goto fail; |
|---|
| 704 | 696 | } |
|---|
| 705 | 697 | |
|---|
| 706 | | - if (unlikely(WARN_ON(ctl_cfg->count > MAX_CTL))) { |
|---|
| 707 | | - dev_err(dev->dev, "Increase static pool size to at least %d\n", |
|---|
| 698 | + if (WARN_ON(ctl_cfg->count > MAX_CTL)) { |
|---|
| 699 | + DRM_DEV_ERROR(dev->dev, "Increase static pool size to at least %d\n", |
|---|
| 708 | 700 | ctl_cfg->count); |
|---|
| 709 | 701 | ret = -ENOSPC; |
|---|
| 710 | 702 | goto fail; |
|---|
| .. | .. |
|---|
| 723 | 715 | struct mdp5_ctl *ctl = &ctl_mgr->ctls[c]; |
|---|
| 724 | 716 | |
|---|
| 725 | 717 | if (WARN_ON(!ctl_cfg->base[c])) { |
|---|
| 726 | | - dev_err(dev->dev, "CTL_%d: base is null!\n", c); |
|---|
| 718 | + DRM_DEV_ERROR(dev->dev, "CTL_%d: base is null!\n", c); |
|---|
| 727 | 719 | ret = -EINVAL; |
|---|
| 728 | 720 | spin_unlock_irqrestore(&ctl_mgr->pool_lock, flags); |
|---|
| 729 | 721 | goto fail; |
|---|